Skip to content

Add warnings on CUDA that compile or runtime performance may be affected - #180

Merged
szymonlopaciuk merged 2 commits into
xsuite:mainfrom
szymonlopaciuk:cuda-slow-warnings
Jul 24, 2026
Merged

Add warnings on CUDA that compile or runtime performance may be affected#180
szymonlopaciuk merged 2 commits into
xsuite:mainfrom
szymonlopaciuk:cuda-slow-warnings

Conversation

@szymonlopaciuk

@szymonlopaciuk szymonlopaciuk commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Current behaviour of ContextCupy with respect to automatic disabling of expensive optimisations is a bit opaque, and can be transparently enabled when not desired, but also not enabled when expected.

This PR:

  • adds an explanation about the auto-disabling of expensive optimisations when supported, and introduces the flag XO_CUDA_NO_FAST_COMPILE and the module-level switch xo.context_cupy.no_fast_compile, used to control this behaviour;
  • when XO_CUDA_NO_FAST_COMPILE is not given, but the current NVRTC version does not support disabling the optimisations, emits a warning to the user that they may need to update CUDA/NVRTC if compile performance is a problem.

Additionally:

  • this PR changes the CI lint workflow to use pre-commit so that the checks on CI and local match: currently this is not the case, which causes confusion.

Checklist

Mandatory:

  • I have added tests to cover my changes
  • All the tests are passing, including my new ones
  • I described my changes in this PR description

Optional:

  • The code I wrote follows good style practices (see PEP 8 and PEP 20).
  • I have updated the docs in relation to my changes, if applicable
  • I have tested also GPU contexts

@szymonlopaciuk szymonlopaciuk mentioned this pull request Jul 24, 2026
@szymonlopaciuk
szymonlopaciuk merged commit 2acc797 into xsuite:main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant