Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions aten/src/ATen/native/cuda/int4mm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,14 @@ struct BLayout_TC_int4 {
// type pun, the __nv_bfloat162 value in bf16x2x4 is a struct and
// can't be used as a 32-bit asm register argument for `mma`
static_assert(sizeof(bf16x2x4) == sizeof(out[0][0]), "");
// On Windows with ROCm, std::memcpy resolves to a __host__-only
// function and cannot be called from __device__ code. Use the raw
// memcpy which the HIP compiler provides as a __device__ builtin.
#if defined(_WIN32) && defined(USE_ROCM)
memcpy(&out[i][j], &v, sizeof(bf16x2x4_u32));
#else
std::memcpy(&out[i][j], &v, sizeof(bf16x2x4_u32));
#endif
}
}
}
Expand Down