Skip to content

test: skip CUDA-GL interop tests when the GL context is not on an NVIDIA GPU - #2986

Open
IvanGrigorik wants to merge 3 commits into
NVIDIA:mainfrom
IvanGrigorik:gl-driver-fail
Open

IvanGrigorik wants to merge 3 commits into
NVIDIA:mainfrom
IvanGrigorik:gl-driver-fail

Conversation

@IvanGrigorik

Copy link
Copy Markdown

Description

closes #2985

The CUDA-GL interop tests fail with CUDA_ERROR_UNKNOWN when the current GL context is on a GPU from another vendor, for example on a hybrid-graphics laptop whose display is driven by a non-NVIDIA iGPU. CUDA-GL interop needs the context to be on an NVIDIA GPU, and the generic error the driver returns can't be told apart from a real failure at the call site. So instead of catching it, the tests now check the context up front and skip.

New tests and old tests verification

On a hybrid laptop (RTX 3050 Ti + AMD Cezanne iGPU, driver 595.84, CUDA 13.3):

  • With DISPLAY set to non-NVIDIA GPU: test_graphics_apis.py gives 1 passed, 2 skipped, and test_graphics.py + test_helpers.py give 53 passed, 24 skipped. Skips report GL context is not on an NVIDIA GPU (GL_VENDOR='...', ...). Before this change, the same runs had 2 + 24 failures.
  • With DISPLAY unset (headless EGL, context on NVIDIA): 3 passed and 77 passed, with no skips, so the interop path is still exercised

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module labels Oct 1, 2026
@juenglin juenglin added the test Improvements or additions to tests label Oct 5, 2026
@juenglin juenglin assigned juenglin and IvanGrigorik and unassigned juenglin Oct 5, 2026
@juenglin
juenglin requested review from juenglin and rparolin October 5, 2026 18:16
@juenglin

juenglin commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

/ok to test d10a7c3

@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot Oct 5, 2026
@juenglin juenglin added this to the cuda.core 1.3.0 milestone Oct 5, 2026
@juenglin

juenglin commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

/ok to test d10a7c3

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

@juenglin

juenglin commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

/ok to test ba618e4

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: CUDA-GL interop tests fail with CUDA_ERROR_UNKNOWN when the GL context is on a non-NVIDIA GPU

2 participants