# tensorplay.cuda.get_device_capability

Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_device_capability.html

# tensorplay.cuda.get_device_capability

tensorplay.cuda.get_device_capability(device: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [None](https://docs.python.org/3/library/constants.html#None) = None) &#x2192; [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int)][[source]](../_modules/tensorplay/cuda.html#get_device_capability)

Get the cuda capability of a device.

Parameters:

device ([tensorplay.Device](tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/library/functions.html#int) or [str](https://docs.python.org/3/library/stdtypes.html#str), optional) – device for which to return the
device capability. This function is a no-op if this argument is
a negative integer. It uses the current device, given by
[current_device()](tensorplay.cuda.current_device.html#tensorplay.cuda.current_device), if [device](tensorplay.cuda.device.html#tensorplay.cuda.device) is None
(default).

Returns:

the major and minor cuda capability of the device

Return type:

[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)([int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int))
