- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for try_emplace (0.17 sec)
-
tensorflow/compiler/mlir/op_or_arg_name_mapper.cc
name = StringRefToView(GetUniqueName(GetName(op_or_val))); return name; } int OpOrArgNameMapper::InitOpName(OpOrVal op_or_val, llvm::StringRef name) { auto it = name_to_count_.try_emplace(name, 0); auto inserted = op_or_val_to_name_.try_emplace( op_or_val, StringRefToView(it.first->first())); (void)inserted; // TODO(jpienaar): Debug cases where we expect this behavior.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/cc/config.cc
WeightOnlyPtq& weight_only_ptq_spec = *spec.mutable_method()->mutable_weight_only_ptq(); if (auto [iter, inserted] = weight_only_ptq_spec.mutable_input_quantized_types()->try_emplace(1); inserted) { iter->second.mutable_dimension_specs(); } return spec; } // Returns a `QuantizationSpec` for performing static-range PTQ on the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 03:36:50 UTC 2024 - 8.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_op_interfaces.cc
if (IsResourceHandleAnonymous(shared_name)) return {resource, next_id++}; ResourceHandle handle(container, shared_name, device, /*op=*/nullptr); auto emplace_res = resource_handle_id_map.try_emplace(handle, next_id); // New ID created, increment next_id. if (emplace_res.second) ++next_id; return {resource, emplace_res.first->second}; } #include "tensorflow/compiler/mlir/tensorflow/ir/tf_op_interfaces.cc.inc"
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Aug 03 15:22:46 UTC 2021 - 1.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/sink_constant.cc
if (filter && !filter(cluster, const_op.getValue())) return; // We found a constant, try to insert it in the map and re-use its // cloned value if any. auto map_entry = sunk_constant.try_emplace(constant, nullptr); if (!map_entry.second) { // This constant has already been cloned into the region, reuse it. use->set(map_entry.first->getSecond().getResult());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 4.3K bytes - Viewed (0) -
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/tfrt/analysis/cost_analysis.cc
void RegisterCostFunction(CostFunctionRegistry& registry, absl::string_view op_name, CostFunction cost_function) { auto r = registry.try_emplace(op_name, std::move(cost_function)); assert(r.second); (void)r; } template <typename OpType, typename F> void RegisterCostFunction(CostFunctionRegistry& registry, F f) { RegisterCostFunction(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.6K 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/lite/transforms/partitioned_topological_sort.cc
bool prev_part = false; for (Operation &op : ops) { ++num_all_ops; const bool part = partition(&op); num_part_ops += part; num_partitions_before += part && !prev_part; unscheduled_ops.try_emplace(&op, part); prev_part = part; } Block::iterator next_unscheduled_op = ops.begin(); const Block::iterator end = ops.end(); // An operation is ready to be scheduled if all its operands are ready. An
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Dec 19 15:05:28 UTC 2023 - 7.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)