# tensorplay.cuda.set_device Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.set_device.html ```python tensorplay.cuda.set_device(device: Any) → None ``` Set the current device. Usage of this function is discouraged in favor of [device](/docs/generated/tensorplay.cuda.device.html#tensorplay.cuda.device). In most cases it’s better to use CUDA_VISIBLE_DEVICES environmental variable. Parameters: device ([tensorplay.Device](/docs/generated/tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/builtins/functions.html#int)) – selected device. This function is a no-op if this argument is negative.