torch.xpu.get_device_name¶
- torch.xpu.get_device_name(device=None)[源][源]¶
獲取裝置的名稱。
- 引數
device (torch.device or int or str, optional) – 需要返回名稱的裝置。如果此引數為負整數,則此函式為空操作。如果
device為None(預設),則使用current_device()指定的當前裝置。- 返回值
裝置的名稱
- 返回型別
獲取裝置的名稱。
device (torch.device or int or str, optional) – 需要返回名稱的裝置。如果此引數為負整數,則此函式為空操作。如果 device 為 None (預設),則使用 current_device() 指定的當前裝置。
裝置的名稱