From 1df6f6af8e0f23116e4a4a7d4859cd55da9e10ba Mon Sep 17 00:00:00 2001 From: Rostyslav Geyyer <46627076+geyyer@users.noreply.github.com> Date: Thu, 23 Oct 2025 12:54:13 -0500 Subject: [PATCH] Rearrange pointers to fix the reinterpret_cast issue (#3077) [ROCm/composable_kernel commit: 6df69abeef7e1668fa09ec38b9124d00db4ac114] --- test/mx_mfma_op/mx_mfma_op.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/mx_mfma_op/mx_mfma_op.hpp b/test/mx_mfma_op/mx_mfma_op.hpp index b2e615b9d8..47b4419379 100644 --- a/test/mx_mfma_op/mx_mfma_op.hpp +++ b/test/mx_mfma_op/mx_mfma_op.hpp @@ -789,12 +789,12 @@ struct store_C_col_major CScalarFragT chunks[vectorSize(CFragT{}) / VW]; } fragC{cFrag}; // Initialize with input fragment - *(reinterpret_cast(output + startOffset)) = fragC.chunks[0]; - *(reinterpret_cast(output + startOffset + kMajorOffset)) = fragC.chunks[1]; - *(reinterpret_cast(output + startOffset + 2 * kMajorOffset)) = - fragC.chunks[2]; - *(reinterpret_cast(output + startOffset + 3 * kMajorOffset)) = - fragC.chunks[3]; + CScalarFragT* fragPtr; + for(uint32_t idx = 0; idx < vectorSize(CFragT{}) / VW; ++idx) + { + fragPtr = reinterpret_cast(output + startOffset + idx * kMajorOffset); + *fragPtr = fragC.chunks[idx]; + } } };