Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 32 for device_num (0.21 sec)

  1. tensorflow/c/eager/dlpack.cc

    DLDevice GetDlContext(TFE_TensorHandle* h, TF_Status* status) {
      DLDevice ctx;
      const char* device_name =
          tensorflow::unwrap(h)->BackingDeviceName(&status->status);
      DeviceNameUtils::ParsedName parsed_name;
      tensorflow::DeviceNameUtils::ParseFullName(device_name, &parsed_name);
      std::string device_type = parsed_name.type;
      int device_id = 0;
      if (parsed_name.has_id) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 15 09:49:45 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/session_utils.cc

    }
    
    tensorflow::Var* GetVariableFromSession(mlir::TF::VarHandleOp var_handle_op,
                                            llvm::StringRef device_name,
                                            const tensorflow::DeviceMgr* mgr) {
      tensorflow::Device* device = nullptr;
      if (!mgr || !mgr->LookupDevice(StringRefToView(device_name), &device).ok())
        return nullptr;
      tensorflow::Var* var_ptr = nullptr;
      const auto& container = var_handle_op.getContainer().str();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_device.cc

                                                     const string& device_name,
                                                     int device_ordinal) {
      return Device::BuildDeviceAttributes(
          absl::StrCat(name_prefix, "/device:", device_name, ":", device_ordinal),
          DeviceType(device_name), Bytes(16ULL << 30), DeviceLocality(),
          absl::StrCat("device: ", device_name, " device"));
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 21:05:42 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/stream_executor/stream_executor.cc

        OwnedTFStatus c_status(TF_NewStatus());
        SP_Stream stream_handle = static_cast<CStream*>(stream)->Handle();
        SP_DeviceMemoryBase device_mem = DeviceMemoryBaseToC(location);
        stream_executor_->mem_zero(&device_, stream_handle, &device_mem, size,
                                   c_status.get());
        return StatusFromTF_Status(c_status.get());
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 14 07:39:19 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  5. tensorflow/c/kernels.cc

    }
    
    TF_StringView TF_GetDeviceName(TF_OpKernelContext* ctx) {
      const auto& device_name =
          reinterpret_cast<tensorflow::OpKernelContext*>(ctx)->device()->name();
      TF_StringView device_name_sv;
      device_name_sv.data = device_name.data();
      device_name_sv.len = device_name.length();
      return device_name_sv;
    }
    
    #if !defined(IS_MOBILE_PLATFORM) && !defined(IS_SLIM_BUILD)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 36K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/test_util.h

    class DeviceSetup {
     public:
      void AddDevicesAndSetUp(
          const std::vector<std::string>& device_names,
          const std::optional<FunctionDef>& fdef = std::nullopt);
      Device* GetDevice(const string& device_name);
      FunctionLibraryRuntime* flr() { return flr_; }
    
     private:
      FunctionLibraryRuntime* flr_;
      std::unique_ptr<DeviceMgr> device_mgr_;
      std::unique_ptr<FunctionLibraryDefinition> lib_def_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 16 18:03:15 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/get_compiler_ir.cc

      NameAttrList function;
      function.set_name(std::string{func_name});
    
      std::string device_name;
      if (!platform_name.empty()) {
        device_name = absl::StrCat("/device:", platform_name, ":0");
      }
      FunctionLibraryRuntime* flr = pflr->GetFLR(device_name);
      if (flr == nullptr) {
        // Use CPU as the fallback to get the `FunctionLibraryRuntime`.
        flr = pflr->GetFLR("/device:CPU:0");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 06:59:07 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/device_util.h

      }
    
      using DeviceTypeConstRef = std::reference_wrapper<const DeviceType>;
    
      absl::StatusOr<DeviceTypeConstRef> GetDeviceTypeFor(
          absl::string_view device_name) {
        TF_ASSIGN_OR_RETURN(DeviceId device_id, GetIdFor(device_name));
        return std::cref(*id_to_device_type_[device_id.id()]);
      }
    
      string DebugString(const DeviceSet& device_set) const;
    
     private:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 17:18:31 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util.cc

      const std::string attrKey = "T";
      for (const Node* node : graph.nodes()) {
        if (node->type_string() == nodeType) {
          auto device_name = node->assigned_device_name();
          DeviceNameUtils::ParsedName device;
          if (DeviceNameUtils::ParseFullName(device_name, &device) &&
              device.has_job && device.job == jobType) {
            for (const auto& attr : node->attrs()) {
              auto attr_key = attr.first;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 12:22:33 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/xla_tpu_device.cc

        return absl::OkStatus();
      }
    
      int device_count = platform->VisibleDeviceCount();
    
      for (int i = 0; i < device_count; ++i) {
        const string device_name = absl::StrCat("/physical_device:TPU:", i);
        devices->push_back(device_name);
      }
    
      return absl::OkStatus();
    }
    
    Status TpuNodeDeviceFactory::CreateDevices(
        const SessionOptions& session_options, const string& name_prefix,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 20.9K bytes
    - Viewed (0)
Back to top