Skip to content

Fix compile error in MI350 with ROCm7 - #599

Merged
valarLip merged 7 commits into
mainfrom
rocking/fix-compile-error
Jul 2, 2025
Merged

valarLip merged 7 commits into
mainfrom
rocking/fix-compile-error

Conversation

@rocking5566

Copy link
Copy Markdown
Contributor

No description provided.

@rocking5566 rocking5566 changed the title Fix compile error in MI350 Fix compile error in MI350 with ROCm7 Jul 1, 2025
@rocking5566
rocking5566 requested review from solinzby1 and valarLip July 1, 2025 22:28
@rocking5566
rocking5566 force-pushed the rocking/fix-compile-error branch 2 times, most recently from 389803e to 3a02144 Compare July 2, 2025 06:46
@valarLip
valarLip requested a review from Copilot July 2, 2025 11:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR restructures the kernel definition data to fix a compile error on MI350 with ROCm7 and trims configuration files accordingly.

  • Replaces inline kernels_list and default_kernels_dict definitions in Python with expanded multi-line kernelInstance calls.
  • Simplifies the C++ rowwise_heuristic_dispatch function to always return a single kernel.
  • Cleans up CSVs by removing many untuned/tuned GEMM entries and updates the composable_kernel submodule commit.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
csrc/ck_gemm_a8w8_bpreshuffle/gemm_a8w8_bpreshuffle_common.py Expanded and reformatted Python kernel definition dictionaries
csrc/ck_gemm_a8w8_bpreshuffle/gemm_a8w8_bpreshuffle.cu Simplified heuristic dispatch to a single return
aiter/configs/a8w8_bpreshuffle_untuned_gemm.csv Removed large blocks of untuned GEMM configuration entries
aiter/configs/a8w8_bpreshuffle_tuned_gemm.csv Pruned tuned GEMM entries to a small subset
3rdparty/composable_kernel Updated submodule commit
Comments suppressed due to low confidence (4)

aiter/configs/a8w8_bpreshuffle_untuned_gemm.csv:56

  • Many untuned GEMM configurations were removed from this CSV. Verify that the remaining entries still cover the full range of required (M, N, K) cases, as missing entries could lead to untested or unexpected scenarios.
16384,8192,1024

csrc/ck_gemm_a8w8_bpreshuffle/gemm_a8w8_bpreshuffle.cu:28

  • The dispatch function now unconditionally returns the same kernel for all (M, N, K) values, removing the original branching logic and fallback checks. Consider restoring appropriate conditional branches or adding an explicit error/fallback for unsupported K ranges to avoid incorrect kernel selection.
{

csrc/ck_gemm_a8w8_bpreshuffle/gemm_a8w8_bpreshuffle_common.py:72

  • [nitpick] The expanded multi-line kernelInstance blocks duplicate nearly identical boilerplate for each kernel configuration. Consider loading these entries from an external structured data source (e.g., JSON/CSV) or generating them programmatically to reduce code size and simplify maintenance.
    0: kernelInstance(

csrc/ck_gemm_a8w8_bpreshuffle/gemm_a8w8_bpreshuffle_common.py:1524

  • [nitpick] Commented-out entries in default_kernels_dict can accumulate and clutter the code. If these configurations are no longer needed, consider removing them entirely or moving them to documentation to keep the dictionary concise.
    # (-2): kernelInstance( 256, 128,   128,   256,   16,  16,   16,   16,    4,    4,     [16, 16, 1],       [16, 16, 1],           1,           2,                 [1, 32, 1, 8],            [8, 8, 1],        "Intrawave",         3 ),

@valarLip valarLip self-assigned this Jul 2, 2025
@valarLip
valarLip merged commit 906e504 into main Jul 2, 2025
@valarLip
valarLip deleted the rocking/fix-compile-error branch July 2, 2025 14:43
valarLip pushed a commit that referenced this pull request Mar 18, 2026
* Fix assert fail in amd_direct_load_global_to_lds

* Revert part of the file in commit of 6a3478a, which cause build fail in ROCm7

* Revert "Revert part of the file in commit of 6a3478a, which cause build fail in ROCm7"

This reverts commit 30f4e7a.

* update ck
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.

3 participants