Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for num_elements (0.17 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

        return {};
      }
    
      int64_t num_elements = value_shape.getNumElements();
      SmallVector<int64_t> new_shape;
      for (auto idx : llvm::reverse(llvm::seq<int32_t>(0, rhs_shape.getRank()))) {
        const int64_t rhs_dim = rhs_shape.getDimSize(idx);
        if (num_elements % rhs_dim != 0) {
          return {};
        }
        new_shape.push_back(rhs_dim);
        num_elements = num_elements / rhs_dim;
        if (num_elements == 1) break;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

          // This op is guaranteed to be a constant as ODS checks IsConstTensor.
          // Check if the number of elements meets the requirement.
          int64_t num_elements =
              mlir::cast<ShapedType>(call_op.getOperand(0).getType())
                  .getNumElements();
          if (num_elements < quant_options_.min_num_elements_for_weights()) {
            return absl::InternalError(
                "The params of Gather have fewer number of elements than "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/api/v2/legalize_tf_test.cc

          // zero reserved elements
          %num_elements = "tf.Const"() <{value = dense<0> : tensor<i32>}> {device = "/job:localhost/replica:0/task:0/device:CPU:0"} : () -> tensor<i32>
    
          %list = "tf.TensorListReserve"(%elem_shape, %num_elements) : (tensor<i32>, tensor<i32>) -> tensor<!tf_type.variant<tensor<64x1xbf16>>>
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 23:59:33 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/xla_tpu_device.cc

        if (src->name() != dst->name()) {
          Status s = CheckIfTPUInitialized();
          if (!s.ok()) {
            done(s);
            return absl::OkStatus();
          }
        }
        if (input->shape().num_elements() == 0) {
          // Zero-element tensors have no backing buffers.
          done(absl::OkStatus());
          return absl::OkStatus();
        }
    
        se::Stream* const src_compute_stream = src_xla_context->stream();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/xla_launch_util.cc

    // Construct the tensor for the given type and buffer.
    static Tensor MakeTensor(DataType dtype, const TensorShape& shape,
                             se::DeviceMemoryBase buffer, Allocator* allocator) {
      size_t expected_size = shape.num_elements() * DataTypeSize(dtype);
      auto* tensor_buffer = new XlaTensorBuffer(buffer.opaque(), expected_size,
                                                buffer.size(), allocator);
      Tensor t(dtype, shape, tensor_buffer);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/xla_device_context.cc

                                                 Tensor* device_tensor,
                                                 StatusCallback done,
                                                 bool sync_dst_compute) const {
      if (cpu_tensor->NumElements() == 0) {
        VLOG(2) << "CopyCPUTensorToDevice empty tensor";
        done(absl::OkStatus());
        return;
      }
    
      VLOG(2) << "CopyCPUTensorToDevice " << this << " "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top