Repository navigation
fix(samples): waive CUDA-GL interop on non-NVIDIA GL contexts - #3077
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
|
|
The PR needs an additional label "Bug" besides cuda.core to get CI green. I just added the label. Thank you for the PR @yimoj ! |
|
@lijinf2 while you're here, please help set assignee too, which seems to be required by CI as well. |
Description
Follow-up to the sample migration in #2959; related OpenGL availability handling is tracked in #2767 (this PR does not close that issue).
The migration replaced the old example wrapper's unconditional GL-sample skip with actual sample execution. A window can now open successfully on a non-NVIDIA GL context, such as Microsoft/D3D12, but these samples still attempt CUDA resource registration. The existing graphics tests already reject such contexts.
Reuse
gl_context_not_on_nvidia_gpu_reason()inglInteropFluid,glInteropMipmapLod, andglInteropPlasmaafter creating the GL window and before registering CUDA resources. Ineligible contexts report the reason, close the window, and exit with the negotiated sample-waiver code. NVIDIA GL contexts continue normally, and genuine CUDA errors remain failures.Only these three samples change. No new tests are added: the existing GL-helper tests cover vendor eligibility, and the sample harness already runs all three examples for three frames.
Validation
python -m compileall -qpasses for the three changed samples.git diff --checkpasses.Checklist