Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for DataTypeSize (0.11 sec)

  1. tensorflow/c/tf_datatype.cc

    #include "tensorflow/c/tf_datatype.h"
    
    #include "tensorflow/core/framework/types.h"
    
    size_t TF_DataTypeSize(TF_DataType dt) {
      return static_cast<size_t>(
          tensorflow::DataTypeSize(static_cast<tensorflow::DataType>(dt)));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 19:14:59 UTC 2019
    - 900 bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/pjrt_tensor_buffer_util.cc

    #include "tensorflow/core/framework/types.h"
    #include "tsl/platform/statusor.h"
    
    namespace tensorflow {
    
    static size_t GetTensorSize(const TensorShape& shape, const DataType dtype) {
      return shape.num_elements() * DataTypeSize(dtype);
    }
    
    absl::StatusOr<Tensor> MakeTensorFromPjRtBuffer(
        const DataType dtype, const TensorShape& shape,
        std::unique_ptr<xla::PjRtBuffer> pjrt_buffer) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 14 18:14:47 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_launch_util.cc

    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);
      tensor_buffer->Unref();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  4. tensorflow/c/c_api_test.cc

      EXPECT_EQ(TF_HALF, static_cast<TF_DataType>(tensorflow::DT_HALF));
      EXPECT_EQ(TF_DataTypeSize(TF_DOUBLE),
                tensorflow::DataTypeSize(tensorflow::DT_DOUBLE));
      EXPECT_EQ(TF_DataTypeSize(TF_STRING),
                tensorflow::DataTypeSize(tensorflow::DT_STRING));
      // Test with invalid type; should always return 0 as documented
      EXPECT_EQ(TF_DataTypeSize(static_cast<TF_DataType>(0)), 0);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 96.9K bytes
    - Viewed (0)
Back to top