Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 135 for getAttrOfType (0.66 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_op_interfaces.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_op_interfaces.h"
    
    namespace mlir {
    namespace TF {
    
    llvm::StringRef GetDeviceOrEmpty(Operation *op) {
      if (auto device_attr = op->getAttrOfType<StringAttr>("device"))
        return device_attr.getValue();
      return llvm::StringRef();
    }
    
    // Returns resource handle value and id for resource op based on attributes. If
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Aug 03 15:22:46 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

        Operation* op) {
      llvm::StringRef device;
      if (auto attr = op->getAttrOfType<mlir::StringAttr>("device")) {
        device = attr.getValue();
      }
    
      llvm::StringRef container;
      if (auto attr = op->getAttrOfType<mlir::StringAttr>("container")) {
        container = attr.getValue();
      }
    
      llvm::StringRef shared_name;
      if (auto attr = op->getAttrOfType<mlir::StringAttr>("shared_name")) {
        shared_name = attr.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/validators.cc

    // and writes X, Y as 32-bit integer attribute to `x`, `y`.
    bool TFIntListIs1XY1(Operation *op, StringRef name, IntegerAttr *x,
                         IntegerAttr *y) {
      auto attr = op->getAttrOfType<ArrayAttr>(name);
      if (!attr) return false;
    
      auto elements = attr.getValue();
      if (elements.size() != 4 ||
          std::any_of(elements.begin(), elements.end(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

      auto num_cores_per_replica_attr = cluster_func->getAttrOfType<IntegerAttr>(
          tensorflow::kNumCoresPerReplicaAttr);
      if (!num_cores_per_replica_attr)
        return cluster_func.emitOpError(
            CreateMissingAttributeMsg(tensorflow::kNumCoresPerReplicaAttr));
    
      int num_cores_per_replica = num_cores_per_replica_attr.getInt();
    
      auto topology_attr =
          cluster_func->getAttrOfType<StringAttr>(tensorflow::kTopologyAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/manipulate_model_attr.cc

    namespace mlir {
    namespace quant {
    
    constexpr StringRef kTfEntryFunctionAttr = "tf.entry_function";
    
    void AddEntryFunctionInput(StringRef input_name, func::FuncOp func_op) {
      auto entry_func_attr =
          func_op->getAttrOfType<DictionaryAttr>(kTfEntryFunctionAttr);
      if (!entry_func_attr) return;
    
      auto entry_func_attrs = SmallVector<NamedAttribute>(entry_func_attr.begin(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 01:13:26 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec.cc

    std::unique_ptr<OpQuantSpec> GetStableHloOpQuantSpec(Operation* op) {
      auto spec = std::make_unique<OpQuantSpec>();
      if (auto call_op = dyn_cast_or_null<TF::XlaCallModuleOp>(op)) {
        auto entry_function =
            call_op->getAttrOfType<FlatSymbolRefAttr>("_entry_function");
        StringRef function_name = entry_function.getValue();
        if (!function_name.starts_with("composite_")) {
          return spec;
        }
    
        if (function_name.contains("conv")) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/cluster_formation.cc

      TF::ReorderOpResultUses(launch_op);
    }
    
    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: Thu Oct 05 13:30:21 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_update_embedding_enqueue_op_inputs.cc

    // passes does not trigger additional logic due to presence of this attribute.
    LogicalResult ExtractEmbeddingAttribute(
        Operation* op, llvm::StringMap<Operation*>* embedding_op_map) {
      auto embedding_attr = op->getAttrOfType<StringAttr>(kTPUEmbeddingAttr);
      if (!embedding_attr) return mlir::success();
    
      if (!embedding_op_map->insert({embedding_attr.getValue(), op}).second)
        return op->emitOpError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.cc

    namespace mlir {
    namespace TF {
    
    namespace {
    
    const char kDeviceAttr[] = "device";
    const char kDeviceGpu[] = "GPU";
    
    std::optional<std::string> GetOpDevice(mlir::Operation *op) {
      mlir::StringAttr device = op->getAttrOfType<mlir::StringAttr>(kDeviceAttr);
      if (!device || device.getValue().empty()) {
        return std::nullopt;
      }
      tensorflow::DeviceNameUtils::ParsedName parsed_name;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_device_helper.cc

          has_tensor_cores);
    }
    
    // Returns true if operation does not have explicit device placement that would
    // prevent it from running on GPU device.
    bool CanUseGpuDevice(Operation *op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      if (!device_attr || device_attr.getValue().empty()) return true;
    
      DeviceNameUtils::ParsedName device;
      if (!DeviceNameUtils::ParseFullName(device_attr.getValue().str(), &device))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 21 08:41:18 UTC 2022
    - 2.4K bytes
    - Viewed (0)
Back to top