Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for TensorShapeToXLAShape (0.22 sec)

  1. tensorflow/compiler/jit/xla_host_send_recv_device_context_test.cc

      TF_ASSERT_OK_AND_ASSIGN(auto stream, executor->CreateStream());
    
      se::DeviceMemoryBase gpu_dst{device_tensor.data(), 4 * sizeof(float)};
      xla::Shape shape;
      TF_ASSERT_OK(TensorShapeToXLAShape(DT_FLOAT, TensorShape({2, 2}), &shape));
    
      // Copy the cpu_tensor to the GPU first before trying to copy it back.
      TF_ASSERT_OK(
          stream->Memcpy(&gpu_dst, origin_cpu_tensor.data(), gpu_dst.size()));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/xla_tpu_device.cc

    absl::StatusOr<xla::Shape> TpuShapeRepresentation(
        const TensorShape& shape, DataType type, bool use_fast_memory,
        XlaLayoutPreference layout_preference) {
      xla::Shape xla_shape;
      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;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_device.cc

    Status DefaultPaddedShapeFn(const Tensor& tensor, xla::Shape* shape) {
      const tensorflow::XlaTensor* xla_tensor =
          tensorflow::XlaTensor::FromTensor(&tensor);
      if (xla_tensor == nullptr) {
        return TensorShapeToXLAShape(tensor.dtype(), tensor.shape(), shape);
      }
    
      const xla::ShapedBuffer& shaped_buffer = xla_tensor->shaped_buffer();
      *shape = shaped_buffer.on_device_shape();
      return absl::OkStatus();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 21:05:42 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/xla_launch_util.cc

                std::initializer_list<se::DeviceMemoryBase>{dmem},
                definition_events, /*on_delete_callback=*/[]() {});
            xla::Shape device_shape;
            TF_RETURN_IF_ERROR(TensorShapeToXLAShape(
                tensor->dtype(), tensor->shape(), &device_shape));
            std::unique_ptr<xla::PjRtBuffer> pjrt_buffer =
                std::make_unique<xla::PjRtStreamExecutorBuffer>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_to_mhlo_int_test.cc

        TF_RETURN_IF_ERROR(tensorflow::ConvertToTensor(
            llvm::dyn_cast<TF::ConstOp>(fold_results[0].getDefiningOp()).getValue(),
            &tensor));
        xla::Shape xla_shape;
        TF_RETURN_IF_ERROR(tensorflow::TensorShapeToXLAShape(
            tensor.dtype(), tensor.shape(), &xla_shape));
        xla::PjRtClient::HostBufferSemantics host_buffer_semantics =
            xla::PjRtClient::HostBufferSemantics::kImmutableUntilTransferCompletes;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 01:03:21 UTC 2024
    - 35.8K bytes
    - Viewed (0)
Back to top