捷徑

torch.cuda.get_device_capability

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

取得裝置的 CUDA 計算能力。

參數

device (torch.deviceintstr, 選用) – 要回傳計算能力的裝置。 如果此參數為負整數,則此函數不執行任何操作。 如果 deviceNone (預設),則它會使用由 current_device() 給定的目前裝置。

回傳

裝置的主要和次要 CUDA 計算能力

回傳類型

tuple(int, int)

文件

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources