- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 135 for getAttrOfType (0.18 sec)
-
tensorflow/compiler/mlir/lite/transforms/insert_call_once_op.cc
for (func::FuncOp init_func_op : tf_saved_model::GetInitializerFunctions(module)) { for (auto func : module.getOps<func::FuncOp>()) { auto dict_attr = func->getAttrOfType<mlir::DictionaryAttr>("tf.entry_function"); if (!dict_attr) continue; OpBuilder builder(func.getContext()); builder.setInsertionPointToStart(&func.getBlocks().front());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 01 05:03:09 UTC 2023 - 2.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc
if (const auto data_format = op->getAttrOfType<StringAttr>("data_format")) { is_supported_affine_op = data_format.getValue() == "NHWC" || data_format.getValue() == "NDHWC"; } } else if (llvm::isa<TF::BatchMatMulV2Op>(op)) { if (const auto adj_y = op->getAttrOfType<BoolAttr>("adj_y")) { is_supported_affine_op = !adj_y.getValue(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/execution_metadata_exporter.cc
// execution. if (llvm::isa<mlir::func::ReturnOp, mlir::quantfork::StatisticsOp>(op)) return std::nullopt; if (!HasValidHardwareTarget(op)) return std::nullopt; auto device = op->getAttrOfType<mlir::StringAttr>(mlir::TFL::tac::kDevice); if (device == nullptr) return std::nullopt; llvm::StringRef device_name_str = device.getValue(); return device_name_str.str(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 06:11:34 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_cluster_cleanup_attributes.cc
// This attribute is used for op colocation. Since all ops are located // on a single device cluster, this private attribute is no longer // needed. op->removeAttr(kClassAttr); if (auto attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { // Preserve device attribute if the op is placed on a replicated core // device. Device attribute is used to infer the appropriate sharding // within TPUs for this op.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 23:50:19 UTC 2022 - 3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/side_effect_analysis_util.cc
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h" namespace mlir { namespace TF { std::string GetDeviceAttrAsResourceInstanceStr(mlir::Operation* op) { auto device_attr = op->getAttrOfType<StringAttr>("device"); // Treat missing device attribute like unspecified (= empty string) attribute. // Note that different op instances with the same string (including empty
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 16 00:33:17 UTC 2023 - 2.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/device_attribute_to_launch.cc
const Dialect* tf_dialect = getContext().getLoadedDialect("tf"); getOperation().walk([&](Operation* op) { if (op->getDialect() != tf_dialect) return WalkResult::advance(); if (auto device = op->getAttrOfType<StringAttr>(kDeviceAttr)) { if (!device.getValue().empty()) WrapOpInLaunch(op, device.getValue()); } return WalkResult::advance(); }); } } // anonymous namespace
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 04 00:59:46 UTC 2022 - 2.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/stablehlo_custom_call.cc
} // namespace bool IsTfFuncCustomCall(stablehlo::CustomCallOp op) { return op.getCallTargetName() == kTfTargetName; } DictionaryAttr GetTfBackendConfig(stablehlo::CustomCallOp op) { return op->getAttrOfType<DictionaryAttr>(kTfBackendConfigAttrName); } FailureOr<SymbolRefAttr> GetTfFuncCustomCallFuncName( stablehlo::CustomCallOp op) { if (!IsTfFuncCustomCall(op)) { return success(nullptr); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 2.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/resource_analyzer_test_pass.cc
StringRef device; StringRef container; StringRef shared_name; }; ResourceKey GetResourceKey(TF::VarHandleOp var_handle_op) { ResourceKey resource_key; if (auto attr = var_handle_op->getAttrOfType<StringAttr>("device")) { resource_key.device = attr.getValue(); } resource_key.container = var_handle_op.getContainer(); resource_key.shared_name = var_handle_op.getSharedName(); return resource_key;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 03 00:21:29 UTC 2023 - 3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/cluster_util_test.cc
return status; } return mlir_module; } std::string GetDevice(Operation* op) { auto device_attr = op->getAttrOfType<StringAttr>("device"); return device_attr ? device_attr.getValue().str() : ""; } bool CanBeIgnoredInCluster(Operation* op) { auto device_attr = op->getAttrOfType<StringAttr>("device"); return !device_attr || device_attr.getValue().empty(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 7.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc
llvm::SmallVector<IslandOp, 8> islands_to_outline; getOperation().walk([&](IslandOp island_op) { auto parent_func = island_op->getParentOfType<func::FuncOp>(); auto skip_island_outlining = parent_func->getAttrOfType<BoolAttr>(mlir::TF::kSkipIslandOutlining); if (skip_island_outlining && skip_island_outlining.getValue()) { // Island was marked to be skipped. return WalkResult::advance(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0)