Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for getAttrOfType (0.28 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.cc

    namespace mlir {
    namespace TF {
    
    using ::tensorflow::kValidDeviceTypes;
    
    LogicalResult HasValidCompilationAndReplicationAttributes(Operation& op) {
      auto replicate_attr = op.getAttrOfType<StringAttr>(kReplicationInfoAttr);
      auto compile_attr = op.getAttrOfType<StringAttr>(kCompileDeviceTypeAttr);
      if (!replicate_attr && !compile_attr) return success();
      if (!replicate_attr || !compile_attr)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

          }
        } else if (StringAttr attr = arg.getDefiningOp()->getAttrOfType<StringAttr>(
                       kDeviceAttr)) {
          return op_device == attr;
        }
        // Fold tf.Identity when arg device is not defined.
        return true;
      };
    
      func_op.walk([&should_fold_op_func](TF::IdentityOp op) {
        StringAttr op_device = op->getAttrOfType<StringAttr>(kDeviceAttr);
        if (should_fold_op_func(op.getOperand(), op_device)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/device_target.cc

      double real_multiplier = scale_product / o_spec.getScale();
      output_multipliers->push_back(QuantizeMultiplier(real_multiplier));
    
      // output ranges
      auto min = rop->getAttrOfType<FloatAttr>("min");
      auto max = rop->getAttrOfType<FloatAttr>("max");
      output_ranges->push_back(CalculateQuantizedRange(
          o_spec.getScale(), o_spec.getZeroPoint(),
          (min ? std::optional<double>(min.getValueAsDouble()) : std::nullopt),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/readonly_references_to_resources.cc

      StringAttr shared_name_attr = op->getAttrOfType<StringAttr>(kSharedNameAttr);
      if (shared_name_attr) {
        auto shared_name = StringRef(shared_name_attr.getValue());
        if (!shared_name.empty()) {
          return shared_name;
        }
      }
      // Attempt to parse "_class" attribute if there is no "shared_name"
      // attribute.
      ArrayAttr classes_attr = op->getAttrOfType<ArrayAttr>(kClassAttr);
      if (!classes_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc

      // The sizes of indices, shared_name and container must be equal.
      int32_t indices_size =
          get_resource_op->getAttrOfType<mlir::ArrayAttr>("indices").size();
      int32_t shared_name_size =
          get_resource_op->getAttrOfType<mlir::ArrayAttr>("shared_name").size();
      int32_t container_size =
          get_resource_op->getAttrOfType<mlir::ArrayAttr>("container").size();
    
      if (!(indices_size == shared_name_size &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/hoist_loop_invariant.cc

    ResourceHandle GetResourceHandle(Operation *op) {
      llvm::StringRef device;
      if (auto attr = op->getAttrOfType<StringAttr>("device")) {
        device = attr.getValue();
      }
    
      llvm::StringRef container;
      if (auto attr = op->getAttrOfType<StringAttr>("container")) {
        container = attr.getValue();
      }
    
      llvm::StringRef shared_name;
      if (auto attr = op->getAttrOfType<StringAttr>("shared_name")) {
        shared_name = attr.getValue();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/translate_utils.cc

    }
    
    mlir::LogicalResult ExtractTfVersions(mlir::ModuleOp module,
                                          VersionDef* versions) {
      versions->Clear();
      auto version_attr =
          module->getAttrOfType<mlir::DictionaryAttr>("tf.versions");
      if (!version_attr) return mlir::failure();
    
      auto producer =
          mlir::dyn_cast_or_null<mlir::IntegerAttr>(version_attr.get("producer"));
      if (!producer) return mlir::failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/validators.h

    inline bool TFDataFormatIsNHWC(Operation *op) {
      auto attr = op->getAttrOfType<StringAttr>("data_format");
      return !attr || attr.getValue() == "NHWC";
    }
    
    // Returns true if the given TensorFlow op does not have a `data_format`
    // attribute (then default to "NDHWC"), or its `data_format` attribute is
    // "NDHWC".
    inline bool TFDataFormatIsNDHWC(Operation *op) {
      auto attr = op->getAttrOfType<StringAttr>("data_format");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/restore_function_name.cc

      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);
    
      if (!original_function_name || !current_function_name) {
        return;
      }
    
    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/analysis/resource_value_typed_analyzer.cc

      StringRef device;
      if (auto attr = op->getAttrOfType<StringAttr>("device")) {
        device = attr.getValue();
      }
    
      StringRef container;
      if (auto attr = op->getAttrOfType<StringAttr>("container")) {
        container = attr.getValue();
      }
    
      StringRef shared_name;
      if (auto attr = op->getAttrOfType<StringAttr>("shared_name")) {
        shared_name = attr.getValue();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
Back to top