Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for kDeviceAttr (1.36 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 &&
                lhs_device_attr.getValue() == rhs_device_attr.getValue());
      };
    
    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/tpu_dynamic_layout_pass.cc

    #include "tensorflow/core/protobuf/tpu/compile_metadata.pb.h"
    #include "tensorflow/core/util/device_name_utils.h"
    
    namespace mlir {
    namespace TFTPU {
    
    namespace {
    
    constexpr char kDeviceAttr[] = "device";
    constexpr char kDeviceCPU[] = "CPU";
    constexpr char kFuncDeviceAttr[] = "tf.device";
    
    struct TPUDynamicLayoutPass
        : public TF::PerFunctionAggregateAnalysisConsumerPass<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/resource_device_inference.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h"
    
    #define DEBUG_TYPE "tf-resource-device-inference"
    
    namespace mlir {
    namespace TF {
    
    namespace {
    constexpr char kDeviceAttr[] = "device";
    constexpr char kFuncDeviceAttr[] = "tf.device";
    
    #define GEN_PASS_DEF_RESOURCEDEVICEINFERENCEPASS
    #include "tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.h.inc"
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 03 03:47:00 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

      // Both the device attribute and compile_device_type attribute should be
      // 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;
    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/transforms/cluster_tf_ops_pass.cc

    namespace TF {
    namespace {
    
    using DeviceNameUtils = ::tensorflow::DeviceNameUtils;
    using ParsedName = ::tensorflow::DeviceNameUtils::ParsedName;
    
    constexpr const char *kHostAttr = "host";
    constexpr const char *kDeviceAttr = "device";
    constexpr const char *kTFDeviceAttr = "tf.device";
    // TODO(donglin): Handle the case where the address of localhost is different
    // from /job:localhost/replica:0/task:0.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/cluster_ops_by_policy.cc

        auto range = llvm::make_filter_range(op->getUsers(), [&](Operation *user) {
          bool same_block = user->getBlock() == op->getBlock();
          bool same_device = op->getAttr(kDeviceAttr) == user->getAttr(kDeviceAttr);
          return same_block && same_device && state.IsMember(user);
        });
        return {range.begin(), range.end()};
      }
    
      // Users of block argument must be in the same block.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc

        }
      }
      return success();
    }
    
    namespace {
    constexpr char kDeviceAttr[] = "device";
    constexpr char kFuncDeviceAttr[] = "tf.device";
    mlir::Attribute GetDeviceOfResource(mlir::func::FuncOp func,
                                        mlir::Value resource) {
      if (auto* resource_op = resource.getDefiningOp()) {
        return resource_op->getAttr(kDeviceAttr);
      } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

      if (auto device_attr =
              func.getArgAttrOfType<mlir::StringAttr>(index, kDeviceAttr))
        *node_def->mutable_device() = device_attr.getValue().str();
    
      llvm::ArrayRef<mlir::NamedAttribute> func_arg_i_attrs =
          mlir::function_interface_impl::getArgAttrs(func, index);
      absl::flat_hash_set<absl::string_view> attrs_to_ignore = {kDeviceAttr,
                                                                kAliasingAttr};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

      if (auto device_attr =
              func.getArgAttrOfType<mlir::StringAttr>(index, kDeviceAttr))
        *node_def->mutable_device() = device_attr.getValue().str();
    
      llvm::ArrayRef<mlir::NamedAttribute> func_arg_i_attrs =
          mlir::function_interface_impl::getArgAttrs(func, index);
      absl::flat_hash_set<absl::string_view> attrs_to_ignore = {kDeviceAttr,
                                                                kAliasingAttr};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

        rewriter.replaceOp(op_to_replace, ValueRange({fused_op}));
        return success();
      }
    };
    
    const char kDeviceAttr[] = "device";
    const char kDeviceGpu[] = "GPU";
    
    std::optional<std::string> GetDevice(mlir::Operation *op) {
      mlir::StringAttr device = op->getAttrOfType<mlir::StringAttr>(kDeviceAttr);
      if (!device || device.getValue().empty()) {
        return std::nullopt;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
Back to top