- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 135 for getAttrOfType (0.18 sec)
-
tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc
auto bias = rewriter.create<TF::ConstOp>(op->getLoc(), bias_type, bias_attr); if (op->getAttrOfType<StringAttr>("padding").getValue() == "EXPLICIT") { // Add Const op for padding value. ArrayRef<Attribute> padding_attr_array = op->getAttrOfType<ArrayAttr>("explicit_paddings").getValue(); auto get_int = [](Attribute attr) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 21:49:50 UTC 2024 - 64.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/colocate_tpu_copy_with_dynamic_shape.cc
ArrayRef<const Device *> results) override { if (llvm::isa<TF::TPUExecuteOp>(op) || llvm::isa<TF::TPUExecuteAndUpdateVariablesOp>(op)) { auto device = op->getAttrOfType<StringAttr>(kDevice); for (auto *operand : operands) propagateIfChanged(operand, operand->SetDevice(device)); } else { // Propagate device through other ops. These ops might have their
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 23 00:30:27 UTC 2023 - 5.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc
// "arg0:0,arg1:0"}`, then this function returns `{"arg0:0", "arg1:0"}`. SmallVector<StringRef> GetEntryFunctionInputs(func::FuncOp func_op) { auto entry_function_attr = func_op->getAttrOfType<DictionaryAttr>("tf.entry_function"); SmallVector<StringRef> inputs; mlir::dyn_cast_or_null<StringAttr>(entry_function_attr.get("inputs")) .strref() .split(inputs, /*Separator=*/",");
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model_test.cc
module_op, /*initializer_type=*/kTfSavedModelInitializerInitType); EXPECT_THAT(init_func_op, NotNull()); EXPECT_THAT(init_func_op.getSymName(), "init_func"); EXPECT_THAT( init_func_op->getAttrOfType<StringAttr>(kTfSavedModelInitializerTypeAttr), kTfSavedModelInitializerInitType); } TEST_F(TfSavedModelTest, GetInitializerFunctionNoMatchingInitializerType) { constexpr StringRef kModuleOpStr = R"mlir(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 01 05:03:09 UTC 2023 - 6.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc
DeviceNameUtils::AddressSpace(parsed_name)); return result.empty() ? kLocalhost : result; } std::string GetHost(Operation *op) { std::string device = ""; if (StringAttr attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { device = attr.getValue().str(); } return GetHost(device); } // The device is considered to be on the localhost iff one of the following is // true:
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 13.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc
getOperation().walk([&](tf_device::ClusterFuncOp cluster_func_op) { Builder builder(cluster_func_op->getContext()); // Skip non-tpu device cluster_func. auto cluster_id = cluster_func_op->getAttrOfType<StringAttr>(TF::kReplicationInfoAttr); if (!cluster_id) return WalkResult::advance(); llvm::SmallVector<int, 4> dynamic_shape_arg_index; // Traverse the operands of the cluster func op and find which operand
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/cc/saved_model_import.cc
existing_func_names.insert(func_name); // We may retrieve the original function's name from the attribute. // Functions without this attribute are ignored. auto original_func_name = func_op->getAttrOfType<StringAttr>("tf._original_func_name"); if (original_func_name) { if (auto alias_itr = function_aliases.find(original_func_name.str()); alias_itr != function_aliases.end()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 12:49:45 UTC 2024 - 6.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/eval_util.cc
auto clean_status = MakeCleanup([status] { TF_DeleteStatus(status); }); // Builds TF operation and sets all the attributes. std::string node_name = "unnamed"; if (auto attr = inst->getAttrOfType<mlir::StringAttr>("name")) { node_name = std::string(attr.getValue()); } auto node_def_or = ConvertTFDialectOpToNodeDef( inst, node_name.c_str(), /*ignore_unregistered_attrs=*/true);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Dec 13 06:02:14 UTC 2023 - 5.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc
// initializer function. Assumes that there exists such an attribute. std::string GetInitializerType(func::FuncOp init_func_op) { return init_func_op ->getAttrOfType<StringAttr>(kTfSavedModelInitializerTypeAttr) .str(); } // An initializer function should satisfy the follwing conditions: // * Its GraphOp should only have control outputs.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun May 12 12:54:52 UTC 2024 - 15.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.cc
} StringRef GetEntryFunctionName(TF::XlaCallModuleOp op) { if (!op->hasAttrOfType<FlatSymbolRefAttr>( TF::kStablehloEntryFunctionAttrName)) { return StringRef(); } return op ->getAttrOfType<FlatSymbolRefAttr>(TF::kStablehloEntryFunctionAttrName) .getValue(); } bool IsHybridQuantizedOp(Operation* op) { if ((op->getNumOperands() != 2 && op->getNumOperands() != 3) ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.8K bytes - Viewed (0)