# device Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.device.html ```python class tensorplay.cuda.device(device: Any) ``` Context-manager that changes the selected device. Parameters: device ([tensorplay.Device](/docs/generated/tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/builtins/functions.html#int)) – device index to select. It’s a no-op if this argument is a negative integer or None.