is_initialized() checks if the internal _initialized flag was already set to true from _lazy_init() and also if the current process is in a “bad fork”, i.e. if you are trying to re-initialize CUDA in forked subprocess.