Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for try_emplace (0.2 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. tensorflow/compiler/mlir/tensorflow/transforms/executor_island_coarsening.cc

      // as we are taking the address of the islands here and the push_back step
      // above may invalidate previously inserted islands mid-loop.
      for (MergedIsland& island : merged_islands_)
        island_to_merged_island_.try_emplace(island.insert_point, &island);
    
      // This functor merges the given `old_merged_island` into the
      // `new_merged_island`. `merge_in_front` is whether the old island should be
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top