Skip to content

[release/2.9] Fix int4mm device memcpy error on Windows (#175410)#3166

Merged
jeffdaily merged 1 commit intorelease/2.9from
release/2.9_cp_0f60458c8ecafe0168363347cfecefdfb7dd8489
Apr 20, 2026
Merged

[release/2.9] Fix int4mm device memcpy error on Windows (#175410)#3166
jeffdaily merged 1 commit intorelease/2.9from
release/2.9_cp_0f60458c8ecafe0168363347cfecefdfb7dd8489

Conversation

@jeffdaily
Copy link
Copy Markdown
Collaborator

On Windows with HIP/ROCm, std::memcpy is a host function and cannot be called from device code. Use raw memcpy (which the HIP compiler provides as a device builtin) when building on Windows.

This will allow builds for of pytorch for gfx942 on Windows. gfx950 is yet to be tested but it should likely build as well.

Pull Request resolved: pytorch#175410
Approved by: https://github.com/jeffdaily

On Windows with HIP/ROCm, std::memcpy is a __host__ function and cannot be called from __device__ code. Use raw memcpy (which the HIP compiler provides as a device builtin) when building on Windows.

This will allow builds for of pytorch for gfx942 on Windows. gfx950 is yet to be tested but it should likely build as well.

Pull Request resolved: pytorch#175410
Approved by: https://github.com/jeffdaily
@jeffdaily jeffdaily merged commit 81ecf9a into release/2.9 Apr 20, 2026
42 checks passed
@jeffdaily jeffdaily deleted the release/2.9_cp_0f60458c8ecafe0168363347cfecefdfb7dd8489 branch April 20, 2026 16:44
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.

2 participants