You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[cuda.core] test_graphics.py fails on headless multi-GPU Linux: EGL device does not match current CUDA device #2864
cuda_core/tests/test_graphics.py fails on headless Linux systems with multiple GPUs. The test fixture initializes CUDA Device(0) (subject to CUDA_VISIBLE_DEVICES), but pyglet's headless EGL backend selects its own default EGL device independently -- CUDA_VISIBLE_DEVICES reorders CUDA's device enumeration but has no effect on EGL's.
On systems where CUDA device 0 and EGL device 0 are different physical GPUs, cuGraphicsGLRegisterBuffer() / cuGraphicsGLRegisterImage() fail with CUDA_ERROR_INVALID_DEVICE, because CUDA-OpenGL interop resources must be registered on the CUDA device associated with the GL rendering context.
144 failures across 6 Python environments (24 test_graphics.py cases per env). Device-mapping validation showed the pass/fail pattern flips with CUDA_VISIBLE_DEVICES and PYGLET_HEADLESS_DEVICE, confirming EGL device index and CUDA device ordinal diverge on this class of system rather than differing by a fixed offset.
Not a regression in GraphicsResource -- the underlying CUDA/EGL device mismatch existed in cuda-core 1.1.0 too but was masked because those tests were skipped there.
Activity
cuda.core: match headless EGL device to the current CUDA device in te…
cuda.core: match headless EGL device to the current CUDA device in te…
test(helpers): narrow EGL device probe catch to MissingFunctionExcept…
test(helpers): keep the EGL device probe from importing pyglet.gl (#3027