Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for set_shapes (0.15 sec)

  1. tensorflow/compiler/jit/xla_launch_util.cc

        xla::Shape output_device_shape = output.on_device_shape();
        TF_RETURN_IF_ERROR(transfer_manager->ReadDynamicShapes(
            stream, &output, &output_device_shape));
    
        output.set_shapes(output_device_shape, output_device_shape);
        for (int i = 0; i < ctx->num_outputs(); ++i) {
          const xla::Shape& subshape =
              xla::ShapeUtil::GetSubshape(output_device_shape, {i});
          TensorShape shape;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/tests/tf_to_hlo_pipeline/sccp-post-shape-inference.mlir

        %2 = "tf.PartitionedCall"(%1) {config = "", config_proto = "", executor_type = "", f = @get_shape} : (tensor<?x?xf32>) -> (tensor<?xi64>)
    
        // CHECK: return %[[RESULT]]
        func.return %2 : tensor<?xi64>
      }
    
      // CHECK-LABEL: func @get_shape
      func.func @get_shape(%arg0 : tensor<*xi64>) -> tensor<?xi64> {
        %0 = "tf.Shape"(%arg0) : (tensor<*xi64>) -> tensor<?xi64>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jul 25 02:54:34 UTC 2023
    - 1020 bytes
    - Viewed (0)
  3. tensorflow/c/tf_tensor.cc

    }
    
    void* TensorInterface::Data() const {
      return tensorflow::TensorCApi::Buffer(tensor_)->data();
    }
    
    void TensorInterface::SetShape(const int64_t* dims, int num_dims) {
      tensorflow::TensorShape s;
      for (int i = 0; i < num_dims; ++i) {
        s.AddDim(dims[i]);
      }
      tensor_.set_shape(s);
    }
    
    Status TensorInterface::BitcastFrom(const TensorInterface& from, DataType type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/tests/ops.mlir

      %0 = tfr.call @Huu(%arg0)  : (tensor<?xf32>) -> !tfr.tensor<K>
      func.return %0 : !tfr.tensor<K>
    }
    
    // -----
    
    // CHECK-LABEL: get_shape
    func.func @get_shape(%arg0: !tfr.tensor) -> (!shape.shape, !shape.shape) {
      %0 = tfr.get_shape %arg0 -> !shape.shape
      %1 = "tfr.get_shape"(%arg0) : (!tfr.tensor) -> !shape.shape
      func.return %0, %1 : !shape.shape, !shape.shape
    }
    
    // -----
    
    // CHECK-LABEL: get_real_shape
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 14 22:15:06 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/xla_tpu_device.cc

      TF_RETURN_IF_ERROR(
          tensorflow::TensorShapeToXLAShape(type, shape, &xla_shape));
      ApiConverter::StackHelper<XLA_Shape> se_shape(xla_shape);
      ApiConverter::StackHelper<XLA_Shape> tpu_shape;
      StatusHelper status;
      stream_executor::tpu::ExecutorApiFn()->XlaShapeToTpuShapeRepresentationFn(
          &se_shape.value, type, use_fast_memory, &tpu_shape.value,
          status.c_status);
      if (!status.status().ok()) {
        return status.status();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfr/ir/tfr_ops.td

        }
      }];
    
      let hasCanonicalizer = 1;
    }
    
    def TFR_GetShapeOp : TFR_Op<"get_shape", [Pure]> {
      let description = [{
        The `get_shape` operation gets the shape of a tfr.tensor and returns
        !shape.shape type.
    
        Example:
    
        ```mlir
        %1 = "tfr.get_shape"(%0) : !tfr.tensor -> !shape.shape
        %1 = tfr.get_shape %0 -> !shape.shape
        ```
      }];
    
      let arguments = (ins TFR_TensorType:$arg);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 10:54:29 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  7. tensorflow/c/tf_tensor_internal.h

      size_t ByteSize() const override;
      void* Data() const override;
      bool IsAligned() const override;
      bool CanMove() const override;
      std::string SummarizeValue() const override;
    
      void SetShape(const int64_t* dims, int num_dims);
      Status ToTensor(tensorflow::Tensor* dst) const;
      Status BitcastFrom(const TensorInterface& from, DataType type,
                         const int64_t* new_dims, int num_new_dims);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 24 20:38:55 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfr/tests/canonicalize.mlir

    // Tests for ops with canonicalization patterns.
    
    // CHECK-LABEL: get_real_shape
    func.func @get_real_shape(%arg0: tensor<1x2xf32>) -> tensor<2xindex> {
      %0 = "tfr.cast"(%arg0) : (tensor<1x2xf32>) -> !tfr.tensor
      %1 = tfr.get_shape %0 -> !shape.shape
      %2 = shape.to_extent_tensor %1 : !shape.shape -> tensor<2xindex>
      func.return %2 : tensor<2xindex>
    
    // CHECK-NEXT: %[[e:.*]] = shape.const_shape [1, 2] : tensor<2xindex>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/g3doc/space_to_depth.md

         kernel_initializer=tf.variance_scaling_initializer(),
         data_format=data_format)
    
        # Use the image size without space-to-depth transform as the input of conv0.
        batch_size, h, w, channel = inputs.get_shape().as_list()
        conv0.build([
         batch_size, h * space_to_depth_block_size, w * space_to_depth_block_size,
         channel // (space_to_depth_block_size**2)
        ])
    
        kernel = conv0.weights[0]
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Oct 24 02:51:43 UTC 2020
    - 8.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/shape_inference.cc

            }
    
            shape_inference::ShapeHandle handle;
            TF_RETURN_IF_ERROR(
                context->MakeShapeFromPartialTensorShape(arg_shape.shape, &handle));
            TF_RETURN_IF_ERROR(shape_refiner->SetShape(n, 0, handle));
          }
        }
    
        // Sometimes we have VariableShape nodes in while loop (after Enter nodes).
        // They won't be constant-folded because TensorFlow constant folding does
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 00:41:19 UTC 2024
    - 13K bytes
    - Viewed (0)
Back to top