Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 86 for StringAttr (0.17 sec)

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

                             Operation* parent) {
      int num_replicas = metadata.getNumReplicas();
      int num_cores_per_replica = metadata.getNumCoresPerReplica();
      StringAttr tpu_replicate_attr =
          metadata->getAttrOfType<StringAttr>(TF::kTpuReplicateAttr);
      if (auto repinput = dyn_cast<TF::TPUReplicatedInputOp>(op)) {
        if (!ValidateReplicatedInput(repinput, num_replicas, tpu_replicate_attr))
          return false;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 06:51:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

      func_attrs.push_back(
          {StringAttr::get(context, "inputs"),
           StringAttr::get(context, absl::StrJoin(input_names, ","))});
      func_attrs.push_back(
          {StringAttr::get(context, "outputs"),
           StringAttr::get(context, absl::StrJoin(output_names, ","))});
      auto dictAttr = DictionaryAttr::get(context, func_attrs);
      main_func->setAttr(StringAttr::get(context, kEntryFunctionAttr), dictAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

    // propagated through.
    bool IsSupportedExecutorOp(Operation& op) {
      auto ops_have_same_device = [](Operation* lhs, Operation* rhs) {
        auto lhs_device_attr = lhs->getAttrOfType<StringAttr>(kDeviceAttr);
        auto rhs_device_attr = rhs->getAttrOfType<StringAttr>(kDeviceAttr);
        return (!lhs_device_attr && !rhs_device_attr) ||
               (lhs_device_attr && rhs_device_attr &&
                lhs_device_attr.getValue() == rhs_device_attr.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc

          func_op.setArgAttr(i, kTFDeviceAttr,
                             StringAttr::get(context, metadata.input_devices[i]));
        }
        for (int i : llvm::seq<int>(0, metadata.result_devices.size())) {
          func_op.setResultAttr(
              i, kTFDeviceAttr,
              StringAttr::get(context, metadata.result_devices[i]));
        }
    
        func_op->setAttr(kHostAttr, StringAttr::get(context, host));
        func_op.setPublic();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc

                !HasOutsideCompiledAncestor(input_defining_op) &&
                !input_defining_op->hasAttrOfType<StringAttr>(
                    kXlaOutsideCompilationAttr)) {
              input_defining_op->setAttr(
                  kXlaOutsideCompilationAttr,
                  StringAttr::get(input_defining_op->getContext(), "auto"));
              outside_compiled_ops.push(input_defining_op);
            }
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

        attrs.push_back(
            NamedAttribute(StringAttr::get(context, "fused_ops"), fused_ops_attr));
        // Epsilon is used only in fusions with the FusedBatchNorm op, so we zero it
        // here.
        Attribute epsilon = rewriter.getF32FloatAttr(0);
        attrs.push_back(
            NamedAttribute(StringAttr::get(context, "epsilon"), epsilon));
    
        if (std::is_same<FusedOpT, _FusedConv2DOp>::value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_metadata_utils.cc

            llvm::formatv(kBadArrayAttrLengthMsg, tensorflow::kInputShardingAttr,
                          op.getNumOperands(), input_shardings.size()));
    
      // Set args metadata in proto.
      mlir::StringAttr replication_attr_name = mlir::StringAttr::get(
          op.getContext(), "mhlo.is_same_data_across_replicas");
    
      auto dynamic_arg_idx = op->getAttrOfType<ArrayAttr>(TF::kDynamicArgIndexAttr);
      llvm::SmallSet<int, 4> dynamic_arg_idx_set;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

        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");
          op->setAttr("key", new_key);
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

      explicit PrepareCompositeFunctionsPass() {}
    
     private:
      // TODO(b/160915525): Consolidate FuncAttr and StringAttr into one.
      void ConvertTFImplements(func::FuncOp func, StringAttr attr);
      void ConvertTFImplementsWithAttributes(func::FuncOp func, FuncAttr attr);
      void ConvertTFAPIImplements(func::FuncOp func, StringAttr attr,
                                  ModuleOp module);
      void runOnOperation() override;
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

            new_attr_map_str =
                owner_op->getAttrOfType<StringAttr>(kAttrMapAttribute).str();
            absl::StrAppend(&new_attr_map_str, ",");
          }
    
          // Append "<identifier>:<attribute_name>". Ex) "0:transpose_a".
          const std::string identifier = std::to_string(idx);
          const StringAttr attribute_name = attribute.getName();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
Back to top