Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 135 for getAttrOfType (0.33 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

      m.walk([&](tf_device::ClusterFuncOp cluster_func) {
        auto replicate = cluster_func->getParentOfType<tf_device::ReplicateOp>();
        if (!replicate) return;
        auto mirrored_variable_indices_attr =
            replicate->getAttrOfType<ArrayAttr>(kMirroredVariableIndicesAttr);
        llvm::SmallDenseSet<int64_t, 8> mirrored_replicate_args;
        if (mirrored_variable_indices_attr) {
          for (const auto& mirrored_index : mirrored_variable_indices_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

      }
    
      TF::PartitionedCallOp call_op = dyn_cast_or_null<TF::PartitionedCallOp>(op);
      return call_op && call_op->hasAttrOfType<StringAttr>(kQuantTraitAttrName) &&
             call_op->getAttrOfType<StringAttr>(kQuantTraitAttrName).getValue() ==
                 llvm::StringRef(
                     QuantTraitValues[QuantizationTrait::FullyQuantizable]);
    }
    
    // Returns the composite function name.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

      module.walk([&](Operation* op) {
        if (isa<TF::XlaSendToHostOp>(op)) {
          StringRef old_key = op->getAttrOfType<StringAttr>("key").getValue();
          auto new_key = StringAttr::get(ctx, old_key.str() + "_dtoh_0");
          op->setAttr("key", new_key);
        } else if (isa<TF::XlaRecvFromHostOp>(op)) {
          StringRef old_key = op->getAttrOfType<StringAttr>("key").getValue();
          auto new_key = StringAttr::get(ctx, old_key.str() + "_htod_0");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc

    }
    
    // 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.
    // TODO(b/284222084): Move executor dialect utilities to a new library.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

              .lookupSymbol<mlir::func::FuncOp>(cluster_func.getFunc());
    
      bool use_spmd = false;
      if (auto use_spmd_attr = cluster_func->getAttrOfType<BoolAttr>(kUseSpmdAttr))
        use_spmd = use_spmd_attr.getValue();
    
      auto num_cores_per_replica_attr =
          cluster_func->getAttrOfType<IntegerAttr>(kNumCoresPerReplicaAttr);
      if (!num_cores_per_replica_attr)
        return cluster_func.emitOpError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

      // TODO - b/310539922: Remove reference to TF/TFL utils.
      if (call_op->hasAttr(kQuantTraitAttrName)) {
        return;
      }
    
      auto function_name = call_op
                               ->getAttrOfType<FlatSymbolRefAttr>(
                                   TF::kStablehloEntryFunctionAttrName)
                               .getValue();
      func::FuncOp func_op = symbol_table.lookup<func::FuncOp>(function_name);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

    namespace mlir {
    namespace TFTPU {
    
    namespace {
    
    constexpr char kXlaOutsideCompilationAttr[] = "_xla_outside_compilation";
    
    bool HasOutsideCompilationAttribute(Operation* op) {
      return op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr) != nullptr;
    }
    
    // Finds op that created a given value. If the value is a BlockArgument, this
    // returns the owner of the Block.
    Operation* GetOpOfValue(Value value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

      // mapping back from the inputs to the input arguments.
    
      llvm::SmallString<64> op_name;
      if (IsLegacyCallInstruction(inst)) {
        // The op_name is the name of the function.
        op_name.append(inst->getAttrOfType<mlir::SymbolRefAttr>("f")
                           .getLeafReference()
                           .getValue());
        // Remove the attribute from the instruction as it is already converted to
        // op_name.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util.cc

    }
    
    mlir::LogicalResult GetTopology(mlir::tf_device::ClusterOp cluster,
                                    std::string& topology) {
      mlir::StringAttr topology_attr =
          cluster->getAttrOfType<mlir::StringAttr>(tensorflow::kTopologyAttr);
      if (topology_attr) {
        topology = topology_attr.getValue();
        return mlir::success();
      } else {
        return cluster.emitOpError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 10 20:10:40 UTC 2024
    - 32.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        auto bias =
            rewriter.create<TF::ConstOp>(op->getLoc(), bias_type, bias_attr);
    
        if (op->getAttrOfType<StringAttr>("padding").getValue() == "EXPLICIT") {
          // Add Const op for padding value.
          ArrayRef<Attribute> padding_attr_array =
              op->getAttrOfType<ArrayAttr>("explicit_paddings").getValue();
    
          auto get_int = [](Attribute attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
Back to top