Skip to content

cuda.core: fix a few test issues - #2714

Open
juenglin wants to merge 7 commits into
NVIDIA:mainfrom
juenglin:graphics-tests-followup
Open

cuda.core: fix a few test issues#2714
juenglin wants to merge 7 commits into
NVIDIA:mainfrom
juenglin:graphics-tests-followup

Conversation

@juenglin

@juenglin juenglin commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to #2701 addressing review feedback and the test-guidance cleanup noted in cleanup-importorskip-dead-code.md.

  • Remove test_close_while_mapped_passes_stream_override (xfail from cuda.core: Fix graphics tests #2701); the stream-forwarding behavior of Buffer.close() is covered elsewhere, and the test asserted on internal call dispatch via patch.object on an immutable Cython type.
  • Fix a partial-resource leak in the GL setup helpers (_setup_gl_buffer/_setup_gl_texture in cuda_core and cuda_bindings): a failure after the window opens now closes the window before re-raising.
  • Remove dead-code pytest.importorskip calls for declared dependencies: Cython/setuptools in test_build_hooks.py and cuda.pathfinder in test_device_launch.py, replaced with top-level imports so a missing install fails collection.
  • Narrow the GL setup except Exception to pyglet's "GL unavailable" exceptions (matched by name to avoid pyglet's import-time shadow-window side effect), so a bug in our own setup code re-raises instead of being hidden as a skip.
  • Narrow _compile_heat_kernels/_compile_bisect_kernels in test_graph_definition_integration.py from bare except Exception to a narrow match on NVRTC's cudaGraphConditionalHandle is undefined diagnostic, so a real compile error fails instead of skipping.

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 Aug 27, 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 Aug 27, 2026
assert buf.handle == 0


@pytest.mark.xfail(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing per PR #2701 review feedback.

@juenglin juenglin added P1 Medium priority - Should do test Improvements or additions to tests labels Aug 27, 2026
@juenglin juenglin added this to the cuda.core 1.2.0 milestone Aug 27, 2026
@juenglin
juenglin force-pushed the graphics-tests-followup branch from 1c5bd29 to 2b149cf Compare August 27, 2026 21:53
@juenglin
juenglin force-pushed the graphics-tests-followup branch from 2b149cf to 92eb2ee Compare August 27, 2026 22:02
@juenglin

Copy link
Copy Markdown
Contributor Author

/ok to test 6854ccb

@juenglin
juenglin requested review from Andy-Jost and rwgk August 27, 2026 22:16
@juenglin
juenglin marked this pull request as ready for review August 27, 2026 22:17
@juenglin juenglin self-assigned this Aug 27, 2026
@juenglin
juenglin force-pushed the graphics-tests-followup branch from 6854ccb to 9a28ab6 Compare August 27, 2026 23:00
@juenglin

Copy link
Copy Markdown
Contributor Author

/ok to test 9a28ab6

@github-actions

Copy link
Copy Markdown

@juenglin
juenglin force-pushed the graphics-tests-followup branch from 9a28ab6 to f05c176 Compare August 27, 2026 23:31
@juenglin

Copy link
Copy Markdown
Contributor Author

/ok to test f05c176

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 P1 Medium priority - Should do test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant