Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 135 for getAttrOfType (0.17 sec)

  1. 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)
  2. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

      // propagated to the reduce function call.
      reduce_call->setAttr(kDeviceAttr,
                           reduce_dataset->getAttrOfType<StringAttr>(kDeviceAttr));
      reduce_call->setAttr(
          TF::kCompileDeviceTypeAttr,
          reduce_dataset->getAttrOfType<StringAttr>(TF::kCompileDeviceTypeAttr));
    
      SmallVector<Value, 4> if_returns;
    
      builder.create<TF::YieldOp>(loc,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc

      // Duplicate of the logic in MultiDeviceFunctionBodyPlacer::BodyNodeDevice
      // LINT.IfChange
      auto device_id = StringAttr::get(call->getContext(), "device");
      auto caller_device = call->getAttrOfType<StringAttr>(device_id);
      if (!caller_device) return;
    
      DeviceNameUtils::ParsedName caller_parsed_device;
      if (!DeviceNameUtils::ParseFullName(caller_device.getValue().str(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  5. 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)
  6. tensorflow/compiler/mlir/tfrt/tests/analysis/update_op_cost_in_tfrt_mlir_test.cc

      absl::flat_hash_map<int64_t, uint64_t> op_cost_map;
      op.walk([&](mlir::Operation* op) {
        const auto cost_attr = op->getAttrOfType<mlir::IntegerAttr>(kCostAttrName);
        if (!cost_attr) return;
        const auto op_key_attr =
            op->getAttrOfType<mlir::IntegerAttr>(kOpKeyAttrName);
        if (!op_key_attr) return;
        op_cost_map[op_key_attr.getInt()] = cost_attr.getInt();
      });
      return op_cost_map;
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jul 21 22:52:12 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. 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)
  8. tensorflow/compiler/mlir/tensorflow/transforms/canonicalize_compile_and_replicate_attributes.cc

                      builder.getStringAttr(tensorflow::kTpuDevice));
        }
    
        // Convert `_XlaMustCompile`.
        if (op->hasAttr(tensorflow::kMustCompileAttr)) {
          bool must_compile_attr_val =
              op->getAttrOfType<BoolAttr>(tensorflow::kMustCompileAttr).getValue();
          op->removeAttr(tensorflow::kMustCompileAttr);
          if (!must_compile_attr_val) {
            if (op->hasAttr(tensorflow::kCompileDeviceTypeAttr)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.5K 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/transforms/constant_op_device_assignment.cc

      ModuleOp module = getOperation();
    
      module.walk([&](TF::ConstOp op) {
        // Keep the ConstOp if the op already have the device attribute.
        if (StringAttr device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
          return WalkResult::advance();
        }
        OpBuilder builder(op);
        llvm::StringMap<mlir::Operation *> cloned_op_by_device;
        bool all_uses_replaced = true;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 3.3K bytes
    - Viewed (0)
Back to top