Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for getAttrOfType (0.52 sec)

  1. tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_async.cc

      CreateOp op = *this;
      p << "(" << op.getInCh() << ") key("
        << op->getAttrOfType<mlir::IntegerAttr>("op_key").getInt() << ") device("
        << op->getAttr("device") << ") " << op->getAttr("op_name") << "()";
    
      fallback_common::PrintExecuteOpCommon(p, op);
      fallback_common::PrintExecuteOpFuncAttribute(p, op);
    
      p << " num_args(" << op->getAttrOfType<mlir::IntegerAttr>("num_args").getInt()
        << ')';
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 15.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_validate_inputs.cc

        return true;
      }
      std::string shard_string;
      if (op->hasAttr(kXLAShardingAttr)) {
        shard_string =
            op->getAttrOfType<StringAttr>(kXLAShardingAttr).strref().str();
      } else {
        shard_string = op->getAttrOfType<StringAttr>(kShardingAttr).strref().str();
      }
      xla::OpSharding sharding;
      if (!shard_string.empty() && sharding.ParseFromString(shard_string)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 06:51:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_metadata_utils.cc

    // `tf_device::ClusterFuncOp`.
    LogicalResult SetMetadataProtoStepMarkerLocation(
        tf_device::ClusterFuncOp op,
        tensorflow::tpu::TPUCompileMetadataProto* metadata) {
      auto step_marker_location =
          op->getAttrOfType<StringAttr>(kStepMarkerLocationAttr);
      if (!step_marker_location)
        return op.emitOpError(CreateMissingAttributeMsg(kStepMarkerLocationAttr));
    
      // Default to `STEP_MARK_AT_ENTRY` for step marker location if attribute is
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  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/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)
Back to top