Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 135 for getAttrOfType (0.23 sec)

  1. 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)
  2. tensorflow/compiler/mlir/quantization/stablehlo/cc/pre_calibration_test.cc

      return non_const_arg->template hasAttrOfType<StringAttr>(name) &&
             ExplainMatchResult(
                 value_matcher,
                 non_const_arg->template getAttrOfType<StringAttr>(name).str(),
                 result_listener);
    }
    
    // Matches an operation that has a FlatSymbolRefAttr whose name is `name` and
    // value matches `value_matcher`.
    MATCHER_P2(HasSymNameAttr, name, value_matcher,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 28 21:41:08 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/tac/common/targets.h

      auto device = op->getAttrOfType<StringAttr>(kDevice);
      if (device == nullptr || device.getValue().empty()) return std::nullopt;
    
      return GetCanonicalHardwareName(device.getValue().str());
    }
    
    // Get inference type attribute from the operation if available.
    inline std::optional<InferenceType> GetInferenceTypeAnnotation(Operation* op) {
      auto inference_type = op->getAttrOfType<StringAttr>(kInferenceType);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

      auto result = convert.RewriteFunc();
      EXPECT_FALSE(failed(result));
      fused_lstm_func_.dump();
    
      // verify transpose
      EXPECT_EQ(
          fused_lstm_func_->getAttrOfType<StringAttr>(kTFImplements).getValue(),
          convert.GetCompositeOpName());
      EXPECT_EQ(fused_lstm_func_.getNumArguments(), 5);
      EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/xla_call_module_serialization.cc

      WalkResult result = module.walk([&](stablehlo::CustomCallOp op) {
        if (!IsTfFuncCustomCall(op)) {
          return WalkResult::advance();
        }
    
        auto backend_config =
            op->getAttrOfType<DictionaryAttr>(kTfBackendConfigAttrName);
        if (!backend_config) {
          op->emitOpError() << "is missing attribute '" << kTfBackendConfigAttrName
                            << "'";
          return WalkResult::interrupt();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

      auto num_cores_per_replica_attr = cluster->getAttrOfType<mlir::IntegerAttr>(
          tensorflow::kNumCoresPerReplicaAttr);
      if (!num_cores_per_replica_attr)
        return cluster.emitOpError(
            CreateMissingAttributeMsg(tensorflow::kNumCoresPerReplicaAttr));
      int num_cores_per_replica = num_cores_per_replica_attr.getInt();
    
      auto topology_attr = cluster->getAttrOfType<StringAttr>("topology");
      if (!topology_attr)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc

    // anyways.
    void UnmarkChildren(ModuleOp module) {
      module->walk([&](Operation* op) {
        if (!op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr)) return;
        Operation* iter_op = op;
        bool remove_attr = false;
        while (auto* parent_op = iter_op->getParentOp()) {
          if (parent_op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr)) {
            remove_attr = true;
            break;
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/common/cost.h

      op->setAttr(kCost, builder->getF32FloatAttr(cost));
    }
    
    // Get the cost annotated with kCost.
    inline bool GetCostOnOp(Operation* op, float* cost) {
      auto cost_type = op->getAttrOfType<FloatAttr>(kCost);
      if (cost_type == nullptr) {
        return false;
      }
    
      *cost = cost_type.getValueAsDouble();
      return true;
    }
    
    }  // namespace tac
    }  // namespace TFL
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jul 21 01:22:53 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  9. 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)
  10. tensorflow/compiler/mlir/lite/experimental/tac/common/subgraph.h

    // attribute on the CallOp means what it actually looks for.
    constexpr char kInterfaceNameAttr[] = "tac.interface_name";
    
    inline std::optional<std::string> GetInterFaceName(Operation* op) {
      auto name_attr = op->getAttrOfType<StringAttr>(kInterfaceNameAttr);
      if (!name_attr) return std::nullopt;
      return name_attr.getValue().str();
    }
    
    }  // namespace tac
    }  // namespace TFL
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 28 05:18:47 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top