oneflow.cuda.get_device_capability

oneflow.cuda.get_device_capability(device: Optional[Union[oneflow._oneflow_internal.device, str, int]] = None)Tuple[int, int]

Gets the cuda capability of a device.

The documentation is referenced from: https://pytorch.org/docs/1.10/generated/torch.cuda.get_device_capability.html.

Parameters

device (oneflow.device or int or str, optional) – device for which to return the device capability. It uses the current device, given by current_device(), if device is None (default).

Returns

the major and minor cuda capability of the device

Return type

tuple(int, int)