Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for try_emplace (0.2 sec)

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

        const llvm::SmallDenseMap<Value, Value>& data_var_to_size_var,
        llvm::StringMap<PartitionedCallStackOpsInfo>*
            decomposed_partitioned_call_callees) {
      auto emplace_res = decomposed_partitioned_call_callees->try_emplace(
          callee.getName(), PartitionedCallStackOpsInfo());
      auto& info = emplace_res.first->second;
      // Recreate the call op with info.
      auto recreate_caller = [&] {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_merge_variables_with_execute.cc

                resource_arg.getArgNumber(), kFuncDeviceAttr);
            if (!IsResourceMergeable(resource_attr, device_attr)) continue;
          }
        }
    
        auto emplace_res = var_access_info.per_resource_info.try_emplace(
            resource, VariableAccessInfo());
        if (!emplace_res.second) {
          LLVM_DEBUG(llvm::dbgs()
                     << "Skipping execute that has multiple reads of a variable: "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 17:52:11 UTC 2024
    - 27K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

        bool use_stablehlo_constant) {
      // Populate from metadata.
      ControlNodes control_nodes;
      for (const auto [from, to] : control_edges) {
        control_nodes.try_emplace(from);
        control_nodes[to].incoming.insert(from);
      }
    
      llvm::SmallVector<mlir::Type, 2> ret_types;
      llvm::SmallVector<mlir::Type, 4> input_types;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
Back to top