- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for try_emplace (0.29 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/resource_device_inference.cc
if (alias_analysis_.IsUnknownResource(resource)) return success(); for (int64_t id : alias_analysis_.GetResourceUniqueIds(resource)) { auto emplace_res = resource_id_to_device_.try_emplace(id, device); if (emplace_res.second) { if (changed) *changed = true; } else if (emplace_res.first->getSecond() != device) { // Existing assignment does not equal the new assignment.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 03 03:47:00 UTC 2023 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/merge_control_flow.cc
const std::unique_ptr<TF::SideEffectAnalysis>& side_effect_analysis, MapToRegionVec2D& merged_groups, MapToOperationVec2D& moved_ops_groups) { auto it_merged = merged_groups.try_emplace(if_cond); auto it_moved = moved_ops_groups.try_emplace(if_cond); llvm::SmallVector<TF::IfRegionOp, 8> sub_merged_groups; auto begin_if_op_iter = if_ops.begin(); while (begin_if_op_iter != if_ops.end()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 17 07:31:01 UTC 2023 - 25.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.cc
assert(id_attr && "tf.resource_arg_unique_id attribute should exist on either " "none or all arguments."); auto emplace_res = attr_id_to_internal_id.try_emplace( id_attr.getInt(), next_unique_instance_id); AddValueUniqueIDMapping(arg, emplace_res.first->getSecond()); // Only increment ID if it has been used.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 09:04:13 UTC 2024 - 28.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.cc
for (const auto& [resource, _] : per_resource_access_info_) { absl::flat_hash_set<Operation*> last_writes = GetLastWrites(resource); auto& resource_to_operations = stack_up_.back(); resource_to_operations.try_emplace(resource); resource_to_operations[resource].insert( last_writes.begin(), last_writes.end()); } per_resource_access_info_.clear(); } void SideEffectAnalysisInfo::Down() {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 09:04:13 UTC 2024 - 41.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/cluster_ops_by_policy.cc
for (Value value : values) Insert(value, constraint); } std::pair<ValueConstraint, bool> ValuesConstraintSet::Insert( Value value, ValueConstraint constraint) { auto emplaced = constraints_.try_emplace(value, constraint); ValueConstraint persisted = emplaced.first->getSecond(); // We've just inserted a new constraint for the value. if (emplaced.second) return {persisted, true};
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 27.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc
return *additional_operation_hooks; } void TensorFlowDialect::RegisterAdditionalOperationHook( TypeID id, AdditionalOpFunction fn) { GetAdditionalOperationHooks().try_emplace(id, std::move(fn)); } TensorFlowDialect::ConstantFoldHook TensorFlowDialect::constant_fold_hook_; TensorFlowDialect::TensorFlowDialect(MLIRContext *context)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc
DenseMap<QuantizationDriver::OpWithResultIndex, QuantizationDriver::QuantStateIndex>& result_states) { const auto [cached, inserted] = value_to_state.try_emplace(value, 0); if (!inserted) { if (as_result) { result_states[{op, index}] = cached->second; } else { operand_states[{op, index}] = cached->second; } return; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 38.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/pick_subgraphs.cc
signalPassFailure(); } subgraph.available_choices.emplace(*inference_device_type, impl); } // Insert in the subgraphs. subgraphs_.try_emplace(call_op, subgraph); // If it's an output subgraph, we will add to the output_subgraphs. if (returned_call_op_set.find(call_op) != returned_call_op_set.end()) { output_subgraphs->push_back(call_op); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 24 15:10:02 UTC 2022 - 19.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc
OpBuilder builder(grad); Value grad_var; auto sit = stats->find(local_var); if (sit == stats->end()) return grad.emitOpError("unknown tensor array"); auto emplace_res = sit->getSecond().grads.try_emplace(grad.getSource().str(), Value()); if (!emplace_res.second) { // If the source has been assigned a grad, use it. grad_var = emplace_res.first->second; } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Mar 02 20:41:19 UTC 2023 - 40.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_cluster_formation.cc
return metadata_op.emitError() << kBadReplicateInfoAttrMsg; // Remove `name` attribute. attrs.erase(StringAttr::get(metadata_op.getContext(), kNameAttr)); auto it = metadata_map->try_emplace(replication_info_attr_str.getValue(), std::move(attrs)); // There are multiple TPUReplicateMetadata ops with the same // `_replication_info` attribute.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 22:03:30 UTC 2024 - 39.3K bytes - Viewed (0)