Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. tensorflow/compiler/mlir/tensorflow/utils/stablehlo_custom_call.cc

    }  // namespace
    
    bool IsTfFuncCustomCall(stablehlo::CustomCallOp op) {
      return op.getCallTargetName() == kTfTargetName;
    }
    
    DictionaryAttr GetTfBackendConfig(stablehlo::CustomCallOp op) {
      return op->getAttrOfType<DictionaryAttr>(kTfBackendConfigAttrName);
    }
    
    FailureOr<SymbolRefAttr> GetTfFuncCustomCallFuncName(
        stablehlo::CustomCallOp op) {
      if (!IsTfFuncCustomCall(op)) {
        return success(nullptr);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. 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)
  10. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc

      llvm::SmallVector<IslandOp, 8> islands_to_outline;
      getOperation().walk([&](IslandOp island_op) {
        auto parent_func = island_op->getParentOfType<func::FuncOp>();
        auto skip_island_outlining =
            parent_func->getAttrOfType<BoolAttr>(mlir::TF::kSkipIslandOutlining);
        if (skip_island_outlining && skip_island_outlining.getValue()) {
          // Island was marked to be skipped.
          return WalkResult::advance();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top