Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 112 for getAttrOfType (0.17 sec)

  1. 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 &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K 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/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)
  6. 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)
  7. 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)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

        if (const auto data_format = op->getAttrOfType<StringAttr>("data_format")) {
          is_supported_affine_op =
              data_format.getValue() == "NHWC" || data_format.getValue() == "NDHWC";
        }
      } else if (llvm::isa<TF::BatchMatMulV2Op>(op)) {
        if (const auto adj_y = op->getAttrOfType<BoolAttr>("adj_y")) {
          is_supported_affine_op = !adj_y.getValue();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/execution_metadata_exporter.cc

      // execution.
      if (llvm::isa<mlir::func::ReturnOp, mlir::quantfork::StatisticsOp>(op))
        return std::nullopt;
    
      if (!HasValidHardwareTarget(op)) return std::nullopt;
    
      auto device = op->getAttrOfType<mlir::StringAttr>(mlir::TFL::tac::kDevice);
      if (device == nullptr) return std::nullopt;
    
      llvm::StringRef device_name_str = device.getValue();
      return device_name_str.str();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 06:11:34 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  10. 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
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 16 00:33:17 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top