- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for DenseStringElementsAttr (0.22 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import.cc
if (op.getKeyIndex() != kTextFileIndex_WholeLine || op.getValueIndex() != kTextFileIndex_LineNumber) { return failure(); } // Try to find filename from constant op. DenseStringElementsAttr filename_attr; if (!matchPattern(op.getFilename().getDefiningOp(), m_Constant(&filename_attr))) { return failure(); } if (filename_attr.getRawStringData().size() != 1) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 6.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc
DenseStringElementsAttr attr; if (!matchPattern(op.getOperation(), m_Constant(&attr))) { continue; } ArrayRef<StringRef> values = attr.getRawStringData(); if (values.size() != 1 || values[0] != "%FILE_PLACEHOLDER") { continue; } op.setValueAttr(DenseStringElementsAttr::get(shaped_type, {filename})); } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 04 09:19:38 UTC 2022 - 5.5K bytes - Viewed (0) -
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/quantization/tensorflow/cc/const_op_size.cc
const ElementsAttr const_value = const_op.getValue(); // This cast is guaranteed to succeed. See `ConvertToTensorProto` from // tensorflow/core/ir/importexport/convert_tensor.cc. const auto str_attr = cast<DenseStringElementsAttr>(const_value); // Sum the sizes of each string. return absl::c_accumulate( str_attr.getRawStringData(), 0, [](int64_t acc, const StringRef str_value) -> int64_t {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Dec 14 04:37:13 UTC 2022 - 2.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc
ShapedType shaped_type = RankedTensorType::get({1}, TF::StringType::get(builder.getContext())); auto const_op = builder.create<TF::ConstOp>( asset.getLoc(), DenseStringElementsAttr::get(shaped_type, {filename})); for (auto init_op : init_table_from_text_file_ops_to_erase) { // Replace the InitializeTableFromTextFileV2Op to use the saved model's // asset filepath.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jan 30 01:12:09 UTC 2023 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_update_embedding_enqueue_op_inputs.cc
mode_string_value.emplace_back(is_training ? "train" : "inference"); builder->setInsertionPoint(embedding_op); auto enqueue_mode = builder->create<TF::ConstOp>( embedding_op->getLoc(), DenseStringElementsAttr::get( RankedTensorType::get({}, builder->getType<TF::StringType>()), mode_string_value)); auto outside_compilation_attr =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 23:50:19 UTC 2022 - 7.7K 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_restore_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 new argument for `func_op` that accepts a string tensor containing
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Mar 12 06:02:20 UTC 2023 - 9K 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)