Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for device_str (0.4 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/extract_tpu_copy_with_dynamic_shape_op.cc

        op->emitError() << "TPUCopyWithDynamicShapeOp is not in a launch";
      }
      std::string device_str = launch_op.getDeviceAttr().getValue().str();
      std::string cpu0_device;
      if (failed(tensorflow::GetNonReplicatedCPU0(op, &cpu0_device)))
        return failure();
      if (device_str != tensorflow::GetDeviceAliasForHostOfLogicalCore(0) &&
          device_str != cpu0_device) {
        op->emitError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/stream_executor/stream_executor_test_util.cc

    void MemcpyDToH(const SP_Device* const device, SP_Stream stream, void* host_dst,
                    const SP_DeviceMemoryBase* const device_src, uint64_t size,
                    TF_Status* const status) {}
    void MemcpyHToD(const SP_Device* const device, SP_Stream stream,
                    SP_DeviceMemoryBase* const device_dst, const void* host_src,
                    uint64_t size, TF_Status* const status) {}
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 21 20:09:00 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/constant_op_device_assignment.cc

          mlir::Operation *user_op = use.getOwner();
          StringAttr device_attr = user_op->getAttrOfType<StringAttr>(kDeviceAttr);
          if (!device_attr) {
            all_uses_replaced = false;
            continue;
          }
          // Cloned the ConstOp and set its device attribute to be the same as the
          // device of the user operation.
          if (cloned_op_by_device.find(device_attr.getValue()) ==
              cloned_op_by_device.end()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_device_helper.cc

    // prevent it from running on GPU device.
    bool CanUseGpuDevice(Operation *op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      if (!device_attr || device_attr.getValue().empty()) return true;
    
      DeviceNameUtils::ParsedName device;
      if (!DeviceNameUtils::ParseFullName(device_attr.getValue().str(), &device))
        return false;
    
      // We can't use GPU if operation explicitly placed on non-GPU device.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 21 08:41:18 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top