- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for DenseStringElementsAttr (0.29 sec)
-
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) -
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) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_asset_sinking_pass.cc
RankedTensorType type = RankedTensorType::get( {}, TF::StringType::get(builder.getContext())); auto const_op = builder.create<TF::ConstOp>( builder.getUnknownLoc(), DenseStringElementsAttr::get(type, {filename})); it = const_ops.insert({asset.getSymName(), const_op}).first; } argument.replaceAllUsesWith(it->second.getOutput());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc
RankedTensorType::get(/*shape=*/{static_cast<int64_t>(str_values.size())}, /*elementType=*/builder.getType<TF::StringType>()); return builder.create<TF::ConstOp>( loc, DenseStringElementsAttr::get( tensor_type, SmallVector<StringRef>(str_values.begin(), str_values.end()))); } // Creates a 1D string array constant for "tensor_names" input of `RestoreV2`
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 22 05:52:39 UTC 2024 - 9.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_import.cc
std::vector<llvm::StringRef> refs; refs.reserve(repr.string_val_size()); for (const auto& ref : repr.string_val()) refs.push_back({ref.data(), ref.size()}); value = mlir::DenseStringElementsAttr::get(shaped_type, refs); } else if (elem_type.isa<mlir::ComplexType, mlir::TF::TensorFlowType>()) { tensorflow::TensorProto repr = tfl::ConvertTfliteConstTensor(tensor, buffer);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_pipelining.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 92.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc
Attribute zero_attr; if (element_type.isIntOrFloat()) zero_attr = rewriter.getZeroAttr(type); else if (element_type.isa<TF::StringType>()) zero_attr = DenseStringElementsAttr::get(type, {""}); if (!zero_attr) return failure(); auto zero_const = rewriter.create<TF::ConstOp>(op.getLoc(), zero_attr); ReplaceTfOpWithNewOp<TF::NotEqualOp>(rewriter, op, result_type,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0)