I’d say it’s set as it’s a by-default cuda variable.
It’s more like a flag, there is no by-default value so if you try to check it, probably won’t be defined. However, if you use
CUDA_VISIBLE_DEVICES = id1,…,idn python yourscript.py
That python code will only see those devices.