[CK_TILE] Fix LDS bank conflicts in CShuffleEpilogue with XOR swizzle#3646
Closed
tenpercent wants to merge 1 commit intodevelopfrom
Closed
[CK_TILE] Fix LDS bank conflicts in CShuffleEpilogue with XOR swizzle#3646tenpercent wants to merge 1 commit intodevelopfrom
tenpercent wants to merge 1 commit intodevelopfrom
Conversation
091ce41 to
2090c5e
Compare
Problem: CShuffleEpilogue exhibited 2-way LDS bank conflicts during store operations. With 2-byte FP16 elements and 4-byte LDS banks, adjacent columns share the same bank, causing conflicts when MFMA warp distribution has adjacent threads accessing adjacent columns. Solution: Apply XOR swizzle on N1 (low bit of N) to interleave even/odd columns into different physical rows: - M' = M ^ (N & 1) - Even columns (N=0,2,4...) stay in physical rows M - Odd columns (N=1,3,5...) go to physical rows M^1 This spreads adjacent columns to different bank regions, eliminating conflicts for all tile sizes including 16x16x16 WMMA configurations. Test coverage: - Added FP16 tests with various warp tile configurations - Added 7 FP8 E4M3 test cases with various warp tile configurations: - 16x16x16 (WMMA): 2x2x1, 1x4x1, 4x1x1 warp layouts - 32x32x16, 16x16x32, 32x32x32, 16x16x64 (MFMA) - Fixed test utility to initialize entire thread buffer for correct output regardless of tile distribution - FP8 tests compare raw byte values (0x40 = 2.0) due to OCP vs FNUZ format differences between device and host (to be updated for gfx942) Profiling results show 0.00-0.08 bank conflicts/access across all tested configurations on MI350 (gfx950).
2090c5e to
6b7e5d3
Compare
Contributor
|
Close the pull request as we are having the padding now. |
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.
Summary
Changes
include/ck_tile/ops/epilogue/cshuffle_epilogue.hpp: XOR swizzle transform inMakeLdsBlockDescriptor()test/ck_tile/epilogue/test_cshuffle_epilogue.cpp: Added FP16 and 7 FP8 E4M3 test casestest/ck_tile/epilogue/test_cshuffle_epilogue_util.hpp: Fixed buffer initializationTest coverage
Profiling results
Bank conflicts/access on MI350 (gfx950): 0.00-0.08 across all tested configurations
Test plan
test_ck_tile_cshuffle_epilogueto verify correctness