Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 63 for device_str (0.55 sec)

  1. tensorflow/compiler/jit/device_util_test.cc

                            string* result) {
      jit::DeviceInfoCache cache;
      jit::DeviceSet device_set;
      for (absl::string_view name : device_names) {
        TF_ASSIGN_OR_RETURN(jit::DeviceId device_id, cache.GetIdFor(name));
        device_set.Insert(device_id);
      }
    
      TF_ASSIGN_OR_RETURN(
          jit::DeviceId result_id,
          PickDeviceForXla(cache, device_set, allow_mixing_unknown_and_cpu));
      *result = string(cache.GetNameFor(result_id));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tf_device_assignment.cc

        Dialect* tf = getContext().getLoadedDialect<TensorFlowDialect>();
        getOperation().walk([&](Operation* op) {
          if (auto device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
            // We assign default device to ops with device attribute that is empty.
            if (device_attr.getValue().empty()) {
              op->setAttr(kDeviceAttr, builder.getStringAttr(default_device_));
            }
          } else if (op->getDialect() == tf) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/cluster_formation.cc

    }
    
    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();
    }
    
    void BuildClusters(Block& block, OpBuilder builder,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Oct 05 13:30:21 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/device_util.cc

    }
    
    }  // namespace
    
    void AddDevicesToOp(mlir::Operation* op, const DeviceSet* device_set) {
      if (!device_set) return;
    
      mlir::MLIRContext* ctx = op->getContext();
      mlir::Builder builder(ctx);
    
      // Collect devices with attached metadata.
      llvm::SmallVector<mlir::NamedAttribute, 8> devices;
      devices.reserve(device_set->devices().size());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/cluster_util_test.cc

      }
      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();
    }
    
    llvm::StringMap<SmallVector<Cluster>> GetClusters(ModuleOp module) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/saved_model/core/test_utils.cc

          DeviceFactory::NewDevice("CPU", {}, "/job:localhost/replica:0/task:0"));
    }
    
    EagerContextPtr CreateTestingEagerContext(DeviceMgr* device_mgr) {
      return EagerContextPtr(new EagerContext(
          SessionOptions(),
          tensorflow::ContextDevicePlacementPolicy::DEVICE_PLACEMENT_SILENT,
          /* async= */ false, device_mgr,
          /* device_mgr_owned= */ false, /* rendezvous= */ nullptr,
          /* cluster_flr= */ nullptr));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Sep 08 20:13:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/device_util.h

    #include "mlir/IR/Operation.h"  // from @llvm-project
    #include "mlir/Support/LogicalResult.h"  // from @llvm-project
    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_structs.h"
    #include "tensorflow/core/common_runtime/device_set.h"
    #include "tensorflow/core/util/device_name_utils.h"
    
    namespace tensorflow {
    
    // Collects all devices known to the system by name and adds them as a
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 05 20:02:33 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/side_effect_analysis_util.cc

    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
      // string) are seen as dependent (same resource instance).
      if (!device_attr) return "";
      return device_attr.str();
    }
    
    void MarkResourceAsReadAndWrite(
        Value value,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 16 00:33:17 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/canonicalize_compile_and_replicate_attributes.cc

            return mlir::WalkResult::advance();
          }
          if (op->hasAttr(tensorflow::kCompileDeviceTypeAttr)) {
            return mlir::WalkResult::advance();
          }
          auto device_attr = op->getAttrOfType<StringAttr>(tensorflow::kDeviceAttr);
          if (!device_attr) {
            op->setAttr(tensorflow::kCompileDeviceTypeAttr,
                        builder.getStringAttr(tensorflow::kEmptyDevice));
            return mlir::WalkResult::advance();
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_op_interfaces.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_op_interfaces.h"
    
    namespace mlir {
    namespace TF {
    
    llvm::StringRef GetDeviceOrEmpty(Operation *op) {
      if (auto device_attr = op->getAttrOfType<StringAttr>("device"))
        return device_attr.getValue();
      return llvm::StringRef();
    }
    
    // Returns resource handle value and id for resource op based on attributes. If
    // a resource handle is anonymous, a new id is always returned.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Aug 03 15:22:46 UTC 2021
    - 1.8K bytes
    - Viewed (0)
Back to top