torch.xpu.get_device_name¶
- torch.xpu.get_device_name(device=None)[原始碼][原始碼]¶
取得設備的名稱。
- 參數
device (torch.device 或 int 或 str, optional) – 要返回其名稱的設備。如果此引數為負整數,則此函數為空操作。如果
device
為None
(預設),它會使用current_device()
給出的當前設備。- 返回
設備的名稱
- 返回類型
取得設備的名稱。
device (torch.device 或 int 或 str, optional) – 要返回其名稱的設備。如果此引數為負整數,則此函數為空操作。如果 device
為 None
(預設),它會使用 current_device()
給出的當前設備。
設備的名稱