- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 86 for StringAttr (0.12 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/hoist_loop_invariant.cc
llvm::StringRef device; if (auto attr = op->getAttrOfType<StringAttr>("device")) { device = attr.getValue(); } llvm::StringRef container; if (auto attr = op->getAttrOfType<StringAttr>("container")) { container = attr.getValue(); } llvm::StringRef shared_name; if (auto attr = op->getAttrOfType<StringAttr>("shared_name")) { shared_name = attr.getValue(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/device_attribute_to_launch.cc
op->removeAttr(StringAttr::get(context, kDeviceAttr)); op->moveBefore(return_op); } void DeviceAttributeToLaunch::runOnOperation() { 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)) {
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/lite/utils/perception_ops_utils.cc
} return success(); } } // namespace LogicalResult ConvertMaxUnpoolingFunc::RewriteFunc() { func_.eraseBody(); func_.addEntryBlock(); func_->setAttr(kTFImplements, StringAttr::get(func_.getContext(), kMaxUnpooling)); OpBuilder builder(func_.getBody()); std::string custom_option_buffer; if (failed(CreateCustomOptions(custom_option_buffer))) { return failure(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 8.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/tflite_import_export.cc
float cost = -1; if (target_hardware->IsOpSupported(op)) { cost = target_hardware->GetOpCost(op); } mlir::StringAttr device_identifier = mlir::StringAttr::get(module.getContext(), device); auto float_type = mlir::FloatType::getF32(module.getContext()); auto float_attr = mlir::FloatAttr::get(float_type, static_cast<float>(cost));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 08 01:19:25 UTC 2023 - 4.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc
StringRef device; if (auto attr = op->getAttrOfType<StringAttr>("device")) { device = attr.getValue(); } StringRef container; if (auto attr = op->getAttrOfType<StringAttr>("container")) { container = attr.getValue(); } StringRef shared_name; if (auto attr = op->getAttrOfType<StringAttr>("shared_name")) { shared_name = attr.getValue(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 09:04:13 UTC 2024 - 8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc
return nullptr; } // Returns the `shared_name` attribute value if exists. If not, returns an // empty string. StringRef GetSharedName(Operation* op) { if (!op->hasAttrOfType<StringAttr>(kSharedNameAttr)) return ""; return op->getAttrOfType<StringAttr>(kSharedNameAttr).getValue(); } // Gets the GraphOp from the function op. Returns an empty op iff it doesn't // exist.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 26 04:26:16 UTC 2023 - 4.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.h
auto perm = GetDataFormatPermutation(op->getDataFormat(), data_format); if (perm.empty()) return failure(); // Update data format attribute. (*op)->setAttr("data_format", StringAttr::get(op->getContext(), data_format)); // Update types for all layout sensitive results. auto layout_sensitive = cast<LayoutSensitiveInterface>(op->getOperation());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 08 01:19:25 UTC 2023 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/common/targets.h
auto device = op->getAttrOfType<StringAttr>(kDevice); if (device == nullptr || device.getValue().empty()) return std::nullopt; return GetCanonicalHardwareName(device.getValue().str()); } // Get inference type attribute from the operation if available. inline std::optional<InferenceType> GetInferenceTypeAnnotation(Operation* op) { auto inference_type = op->getAttrOfType<StringAttr>(kInferenceType);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 06 03:08:33 UTC 2023 - 4.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc
islands_to_outline.push_back(island_op); break; } auto device_type = op.getAttrOfType<StringAttr>(TF::kCompileDeviceTypeAttr); if (device_type && device_type.getValue() == TF::kTpuDevice && !op.hasAttrOfType<StringAttr>(TF::kReplicationInfoAttr)) { // Handle single-core TPU case (no `TPUReplicateMetadataOp`). islands_to_outline.push_back(island_op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc
if (mlir::isa<TF::ResourceType>( getElementTypeOrSelf(iter.value().getType()))) { resource_vec.push_back(GetResourceHandleValueAndIdBase( mlir::cast<mlir::StringAttr>(getContainer()[index]).getValue(), mlir::cast<mlir::StringAttr>(getSharedName()[index]).getValue(), device, getResults()[index], resource_handle_id_map, next_id)); } } return resource_vec; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.6K bytes - Viewed (0)