快捷方式

torch.xpu.get_device_name

torch.xpu.get_device_name(device=None)[源][源]

獲取裝置的名稱。

引數

device (torch.device or int or str, optional) – 需要返回名稱的裝置。如果此引數為負整數,則此函式為空操作。如果 deviceNone (預設),則使用 current_device() 指定的當前裝置。

返回值

裝置的名稱

返回型別

str

文件

查閱 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深入教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源