Skip to content

[no-ci] cuda.core: fix host memcpy source pointer cast - #2476

Merged
rwgk merged 1 commit into
NVIDIA:mainfrom
rwgk:fix_host_memcpy_source_pointer_cast
Aug 1, 2026
Merged

[no-ci] cuda.core: fix host memcpy source pointer cast#2476
rwgk merged 1 commit into
NVIDIA:mainfrom
rwgk:fix_host_memcpy_source_pointer_cast

Conversation

@rwgk

@rwgk rwgk commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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.srcHost assignment from a void * cast to a const void * cast.

The current in-tree cuda-bindings declaration exposes CUDA_MEMCPY3D.srcHost as void *. Cython therefore rejects the assignment because it would discard the const qualifier:

Assigning to 'void *' from 'const void *' discards const qualifier

The regression initially escaped CI because cuda.core was being Cythonized against a published cuda-bindings wheel 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.core to build against the same-checkout cuda-bindings wheel, 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 main does 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

Related: #2395, #2468, #2464, #2470.

Checklist

@copy-pr-bot

copy-pr-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
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.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Aug 1, 2026
@rwgk rwgk added this to the cuda.core 1.2.0 milestone Aug 1, 2026 — with ChatGPT Codex Connector
@rwgk rwgk added bug Something isn't working P0 High priority - Must do! labels Aug 1, 2026 — with ChatGPT Codex Connector
@rwgk rwgk self-assigned this Aug 1, 2026
@rwgk
rwgk marked this pull request as ready for review August 1, 2026 08:21
@rwgk
rwgk enabled auto-merge (squash) August 1, 2026 08:26
@rwgk
rwgk merged commit d46d82c into NVIDIA:main Aug 1, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cuda.core Everything related to the cuda.core module P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants