評價此頁

torch.cuda.get_device_capability#

torch.cuda.get_device_capability(device=None)[原始碼]#

獲取裝置的 CUDA 能力。

引數

device (torch.deviceintstr, 可選) – 要返回裝置能力的裝置。如果此引數為負整數,則此函式不執行任何操作。如果 deviceNone (預設),則使用當前裝置,由 current_device() 指定。

返回

裝置的 CUDA 主次能力

返回型別

tuple(int, int)