Fix compilation error on CUDA 13.0 and higher - #409
Open
JonathanMaes wants to merge 6 commits into
Open
Conversation
Squashed snapshot of the CUDA-Graph-accelerated mumax3 fork (based on mumax/3 commit 3fe3d41, "Update gpus.txt"). Adds a transparent split-graph CUDA Graph capture/replay path for Run()/Steps() across Heun, RK23, RK45DP, RK56 and BackwardEuler, with safety guards for Temp, time-dependent B_ext/material parameters, NoDemagSpins and custom field terms, plus the conv_kernmul launch-range and lazy MaxTorque/MemCpyDtoH micro-optimizations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the upstream mumax3 README with a fork-focused README covering: - Performance table (4K–1M cell speedup measurements on RTX 5060 Ti) - How the CUDA Graph capture/replay path works - Safety guard list - Pre-built Windows binary download link (GitHub Releases) - Build-from-source instructions (Windows CUDA 13.2 + Linux) - Summary table of all source changes vs upstream 3fe3d41 - Upstream citation and license notice Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR captures part of the changes introduced in mumax³-CO, as presented in C.-Y. You, J. Magn. 31, 204-213 (2026).
In CUDA 13.0, the number of arguments of
cuCtxCreate(...)was changed, leading to a compilation error. Behind the scenes, 13.0 usescuCtxCreate_v4instead of the previously usedcuCtxCreate_v2. Hence, this PR explicitly usescuCtxCreate_v2incontext.go. However, this function is not normally exposed bycuda.h, so it is exposed manually incontext.goviaAlternative
An alternative solution is
since
cuda.h(≥13.0) declarescuCtxCreate_v2in a large if-block that only runs if__CUDA_API_VERSION_INTERNALis defined.I am not sure which would be the more robust option.
TODO