Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for DenseStringElementsAttr (0.2 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc

    #include "tensorflow/core/platform/tstring.h"
    #include "tsl/platform/ml_dtypes.h"
    
    namespace tensorflow {
    
    using llvm::ArrayRef;
    using llvm::SmallVector;
    using mlir::Builder;
    using mlir::DenseStringElementsAttr;
    using mlir::ElementsAttr;
    using mlir::RankedTensorType;
    using mlir::ShapedType;
    using mlir::Type;
    using tensorflow::errors::InvalidArgument;
    
    static TensorProto ConvertToProto(const Tensor& input_tensor,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

      auto value_or_status = ConvertTensor(tensor, &b);
      ASSERT_TRUE(value_or_status.ok());
      auto attr = value_or_status.value();
    
      EXPECT_TRUE(mlir::isa<mlir::DenseStringElementsAttr>(attr));
      auto string_attr = mlir::cast<mlir::DenseStringElementsAttr>(attr);
      auto string_values = string_attr.getRawStringData();
      ASSERT_EQ(string_values.size(), 4);
      EXPECT_EQ(string_values[0], mlir::StringRef("one"));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top