捷徑

torch.xpu.get_device_name

torch.xpu.get_device_name(device=None)[原始碼][原始碼]

取得設備的名稱。

參數

device (torch.deviceintstr, optional) – 要返回其名稱的設備。如果此引數為負整數,則此函數為空操作。如果 deviceNone (預設),它會使用 current_device() 給出的當前設備。

返回

設備的名稱

返回類型

str

文件

存取 PyTorch 的完整開發者文件

查看文件

教學

取得針對初學者和進階開發者的深入教學

查看教學

資源

尋找開發資源並獲得問題解答

查看資源