Skip to content

Commit f95994f

Browse files
rparolinclaude
andcommitted
test(cuda.core): skip CUDA-GL interop tests on TCC devices
TCC is a compute-only driver model with no OpenGL, so GL context setup raises a GLException that is not classified as "context unavailable". All 23 test_graphics.py tests then fail instead of skipping (NVBug 6892161). Skip up front when Device().properties.tcc_driver is set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 106da2f commit f95994f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎cuda_core/tests/test_graphics.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ def _register_gl_image(tex_id, target):
6060
raise
6161

6262

63+
def _skip_if_tcc():
64+
"""Skip on TCC: compute-only driver model, no OpenGL, so CUDA-GL interop is unavailable."""
65+
if Device().properties.tcc_driver:
66+
pytest.skip("Device is in TCC mode; TCC does not support OpenGL, so CUDA-GL interop is unavailable.")
67+
68+
6369
def _configure_pyglet_headless():
6470
"""On headless Linux: enable EGL mode, matched to the current CUDA device, or skip if EGL is absent."""
6571
if sys.platform.startswith("linux") and not (os.environ.get("DISPLAY") or os.environ.get("WAYLAND_DISPLAY")):
@@ -157,6 +163,7 @@ def _allocate_gl_texture(win, width, height):
157163
@contextlib.contextmanager
158164
def _gl_context_and_buffer(nbytes=1024):
159165
"""Yield ``(gl_buffer_name, nbytes)`` with a current GL context, or skip if GL is unavailable."""
166+
_skip_if_tcc()
160167
_configure_pyglet_headless()
161168

162169
try:
@@ -187,6 +194,7 @@ def _gl_context_and_buffer(nbytes=1024):
187194
@contextlib.contextmanager
188195
def _gl_context_and_texture(width=16, height=16):
189196
"""Yield ``(tex_id, tex_target)`` with a current GL context, or skip if GL is unavailable."""
197+
_skip_if_tcc()
190198
_configure_pyglet_headless()
191199

192200
try:

0 commit comments

Comments
 (0)