[no-ci] cuda.core: fix host memcpy source pointer cast - #2476
Merged
Conversation
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
rwgk
marked this pull request as ready for review
August 1, 2026 08:21
rwgk
enabled auto-merge (squash)
August 1, 2026 08:26
kkraus14
approved these changes
Aug 1, 2026
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.
Description
This extracts the one-line host memcpy source-pointer fix from #2470 so it can merge independently while the broader CI dependency-selection work continues through review and coordination with #2464.
Landing the correction separately prevents this known source-build failure from continuing to block work based on current
main.Root cause
PR #2395 refactored graph memcpy parameter initialization and inadvertently changed the
CUDA_MEMCPY3D.srcHostassignment from avoid *cast to aconst void *cast.The current in-tree
cuda-bindingsdeclaration exposesCUDA_MEMCPY3D.srcHostasvoid *. Cython therefore rejects the assignment because it would discard the const qualifier:The regression initially escaped CI because
cuda.corewas being Cythonized against a publishedcuda-bindingswheel from PyPI rather than the wheel built from the same checkout. That published declaration accepted the const-qualified pointer. The current bindings wheel was installed only after the core wheel had already been Cythonized, so subsequent tests could not detect the mismatch.Fix
Cast the source address to
void *, matching the current in-tree declaration.A mutable pointer remains assignable to an older declaration accepting
const void *, so the correction remains compatible with the intentional published-bindings compatibility builds. It does not change structure layout, ABI, ownership, or runtime copy behavior.Why this is separate and
[no-ci]This exact commit was extracted unchanged from #2470. There, the local-wheel dependency-selection fix forced
cuda.coreto build against the same-checkoutcuda-bindingswheel, exposed the original compiler error, and fully exercised this correction across the relevant Linux and Windows wheel builds. The sole failure in the latest #2470 run occurred later in an unrelated Windows NumPy source build.A standalone PR based on
maindoes not contain #2470's dependency-selection fix. Its normal CI can therefore take the same published-wheel path that masked the regression and would not independently validate this compatibility boundary. Re-running the full matrix would provide little additional signal over the directly relevant coverage already completed in #2470.Splitting the correction out lets the blocker merge quickly. PR #2464 independently contains the same one-line correction as part of broader selective-wheel-build work; whichever lands second can drop the overlapping patch.
Validation
pre-commit run --all-filespasses on this extracted branch.git diff --checkpasses.Related: #2395, #2468, #2464, #2470.
Checklist