[CK TILE] fix numerical errors of preshuffle_b #3695
+51
−42
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.
This pull request introduces several improvements and fixes related to quantized grouped GEMM (General Matrix Multiply) pipelines and their supporting utilities.
The numerical issue
Steps to reproduce
Solution
The main changes address type correctness, improve data layout and shuffling logic, and expand test coverage to better validate different GEMM configurations.
Key changes include:
Data layout and shuffling logic
shuffle_b_permuteNto useconstexprvariables forKLaneandItemsPerAccess, simplifying tile view construction and correcting the permutation order for improved efficiency and correctness (tensor_shuffle_utils.hpp).KLaneBytesin weight preshuffle pipeline policies to account for internal data type conversion (e.g., frompk_int4_ttofp8), ensuring accurate memory access and alignment in quantized GEMM policies (wp_pipeline_agmem_bgmem_creg_base_policy.hpp,gemm_wp_abquant_pipeline_ag_bg_cr_base_policy.hpp). [1] [2]Test infrastructure enhancements
config_mn_16x16,config_mn_32x32) to support additional GEMM tile shapes and updated tests to run with these configurations for broader coverage (test_gemm_pipeline_util.hpp). [1] [2]