Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 86 for StringAttr (0.33 sec)

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

    };
    
    // Check if op directly uses a key in `virtual_devices`.
    bool DirectUseOfVirtualDevice(const DictionaryAttr& virtual_devices,
                                  Operation* op) {
      StringAttr op_device = op->getAttrOfType<StringAttr>(kDeviceAttr);
      if (!op_device) return false;
      if (virtual_devices.get(op_device.getValue())) return true;
      return false;
    }
    
    // Check if op or its ancestor uses a key in `virtual_devices`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/constant_fold_utils.cc

        return failure();
      }
    
      // Builds TF operation and sets all the attributes.
      std::string node_name = "unnamed";
      if (const StringAttr attr = inst->getAttrOfType<StringAttr>("name")) {
        node_name = std::string(attr.getValue());
      }
      absl::StatusOr<std::unique_ptr<tensorflow::NodeDef>> node_def =
          tensorflow::ConvertTFDialectOpToNodeDef(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.h

    // attribute to be passed to the a tfl.average_pool_2d that can fully replace
    // this composite (here, padding is done directly by the tfl.average_pool_2d as
    // opposed to being extracted into a separate tfl.pad).
    StringAttr GetAvgPoolOpPadAttr(Builder& builder, mhlo::CompositeOp op);
    
    // Get dense attr for a matrix that corrects the over counting of divisors when
    // casting an average pool with ceil mode on in terms of average pool with it
    // off.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_cluster_cleanup_attributes.cc

          // on a single device cluster, this private attribute is no longer
          // needed.
          op->removeAttr(kClassAttr);
          if (auto attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
            // Preserve device attribute if the op is placed on a replicated core
            // device. Device attribute is used to infer the appropriate sharding
            // within TPUs for this op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/cluster_util_test.cc

        return status;
      }
      return mlir_module;
    }
    
    std::string GetDevice(Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      return device_attr ? device_attr.getValue().str() : "";
    }
    
    bool CanBeIgnoredInCluster(Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      return !device_attr || device_attr.getValue().empty();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

      mlir::Builder builder(context);
      StringAttr resource_name_id = builder.getStringAttr(kResourceNameArgAttr);
    
      SmallSet<StringRef, 4> resource_names;
    
      for (func::FuncOp func : module.getOps<func::FuncOp>()) {
        for (int i = 0, e = func.getNumArguments(); i < e; ++i) {
          auto resource_arg =
              func.getArgAttrOfType<StringAttr>(i, kResourceNameArgAttr);
          if (!resource_arg) continue;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/side_effect_analysis_util.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h"
    
    namespace mlir {
    namespace TF {
    
    std::string GetDeviceAttrAsResourceInstanceStr(mlir::Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      // Treat missing device attribute like unspecified (= empty string) attribute.
      // Note that different op instances with the same string (including empty
      // string) are seen as dependent (same resource instance).
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 16 00:33:17 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_colocate_splits.cc

    constexpr char kDeviceAttr[] = "device";
    // Attribute of colocation classes.
    constexpr char kClassAttr[] = "_class";
    
    bool HasDevice(Operation* op) {
      auto attr = op->getAttrOfType<StringAttr>(kDeviceAttr);
      if (!attr) return false;
      return !attr.getValue().empty();
    }
    
    // Returns the predecessors of `op` when `op`'s predecessors are wrapped by
    // islands.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 27 18:44:34 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/restore_function_name.cc

                                                SymbolTable& symbol_table) {
      if (!call_op->hasAttr(kOriginalStablehloEntryFunctionAttrName)) {
        return;
      }
    
      const auto original_function_name = call_op->getAttrOfType<StringAttr>(
          kOriginalStablehloEntryFunctionAttrName);
      const auto current_function_name = call_op->getAttrOfType<FlatSymbolRefAttr>(
          TF::kStablehloEntryFunctionAttrName);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/convert_launch_func_to_tf_call.cc

            /*config=*/builder.getStringAttr(""),
            /*config_proto=*/builder.getStringAttr(""),
            /*executor_type=*/builder.getStringAttr(""));
        call_op->setAttr("device", launch->getAttrOfType<StringAttr>("device"));
        launch.replaceAllUsesWith(call_op);
        launch.erase();
      });
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateConvertLaunchFuncToTFCallPass() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 31 21:08:09 UTC 2023
    - 2.8K bytes
    - Viewed (0)
Back to top