Repository navigation
[Config] Add Gemma-4-31B TP1 a4w4 blockscale GEMM tunings for gfx950 #5928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
prashant182
wants to merge
2
commits into
ROCm:main
Choose a base branch
from
OpenRelayInc:gemma4-31b-a4w4-gfx950-tuned-gemm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
aiter/configs/model_configs/gemma4_31b_a4w4_blockscale_tuned_gemm.csv
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| gfx,cu_num,M,N,K,kernelId,splitK,us,kernelName,tflops,bw,errRatio | ||
| gfx950,256,16,5376,8192,21,0,14.2041,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,99.22,1566.99,0.0 | ||
| gfx950,256,16,5376,16384,21,0,25.9223,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,108.73,1710.62,0.0 | ||
| gfx950,256,16,5376,21504,21,0,32.3908,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,114.21,1795.16,0.0 | ||
| gfx950,256,32,5376,8192,21,0,15.3325,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,183.83,1467.16,0.0 | ||
| gfx950,256,32,5376,16384,21,0,27.4448,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,205.4,1626.77,0.0 | ||
| gfx950,256,32,5376,21504,21,0,34.8124,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,212.53,1680.17,0.0 | ||
| gfx950,256,64,5376,8192,21,0,15.0652,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,374.18,1524.73,0.0 | ||
| gfx950,256,64,5376,16384,21,0,26.9897,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,417.73,1676.66,0.0 | ||
| gfx950,256,64,5376,21504,21,0,34.1238,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,433.64,1734.24,0.0 | ||
| gfx950,256,128,5376,8192,21,0,15.1637,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,743.51,1577.49,0.0 | ||
| gfx950,256,128,5376,16384,21,0,26.9252,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,837.45,1725.71,0.0 | ||
| gfx950,256,128,5376,21504,21,0,34.0954,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,868.01,1776.05,0.0 | ||
| gfx950,256,256,5376,8192,29,0,17.5095,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_64x128E,1287.79,1474.7,0.0 | ||
| gfx950,256,256,5376,16384,29,0,31.7376,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_64x128E,1420.94,1540.44,0.0 | ||
| gfx950,256,256,5376,21504,29,0,40.3057,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_64x128E,1468.53,1570.69,0.0 | ||
| gfx950,256,512,5376,8192,37,0,21.0872,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_96x128E,2138.6,1404.75,0.0 | ||
| gfx950,256,512,5376,16384,37,0,37.5878,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_96x128E,2399.56,1429.71,0.0 | ||
| gfx950,256,512,5376,21504,37,0,49.6439,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_96x128E,2384.58,1386.13,0.0 | ||
| gfx950,256,2048,5376,16384,44,0,93.8627,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_128x384E,3843.67,882.54,0.0 | ||
| gfx950,256,2048,5376,21504,44,0,117.517,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_128x384E,4029.38,866.62,0.0 | ||
| gfx950,256,4096,5376,16384,44,0,172.9967,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_128x384E,4170.91,703.1,0.0 | ||
| gfx950,256,8192,5376,8192,54,0,173.8188,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_256x256E,4151.19,826.46,0.0 | ||
| gfx950,256,8192,5376,16384,54,0,305.6475,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_256x256E,4721.48,651.83,0.0 | ||
| gfx950,256,8192,5376,21504,48,0,388.9721,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_160x384E,4869.45,601.49,0.0 | ||
| gfx950,256,16384,5376,8192,54,0,328.0053,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_256x256E,4399.65,808.8,0.0 | ||
| gfx950,256,16384,5376,16384,48,0,597.6625,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_160x384E,4829.18,593.01,0.0 | ||
| gfx950,256,16384,5376,21504,48,0,771.84,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_160x384E,4907.96,531.36,0.0 | ||
| gfx950,256,16,16384,5376,21,0,12.5396,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,224.77,3557.33,0.0 | ||
| gfx950,256,64,16384,5376,21,0,13.8621,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,813.32,3340.72,0.0 | ||
| gfx950,256,128,16384,5376,29,0,15.6096,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_64x128E,1444.53,3112.1,0.0 | ||
| gfx950,256,256,16384,5376,42,0,19.3244,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_128x128E,2333.69,2748.7,0.0 | ||
| gfx950,256,512,16384,5376,43,0,27.1613,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_128x256E,3320.69,2289.79,0.0 | ||
| gfx950,256,16,20480,5376,29,0,13.1323,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_64x128E,268.29,4245.15,0.0 | ||
| gfx950,256,32,20480,5376,21,0,14.2283,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_32x128E,495.24,3967.23,0.0 | ||
| gfx950,256,64,20480,5376,29,0,16.5808,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_64x128E,849.95,3488.6,0.0 | ||
| gfx950,256,256,20480,5376,38,0,24.193,_ZN5aiter41f4gemm_bf16_per1x32Fp4_BpreShuffle_96x256E,2330.07,2737.33,0.0 | ||
| gfx950,256,512,20480,5376,50,0,35.7478,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_192x256E,3153.84,2165.11,0.0 | ||
| gfx950,256,1024,20480,5376,50,0,67.7905,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_192x256E,3326.22,1471.38,0.0 | ||
| gfx950,256,16,43008,5376,14,0,22.5658,a4w4_blockscale_256x32x128x128_16x16_16x16_8x32x1_8x32x1_1x16x1x16_8_2x2_intrawave_v3,327.87,5185.93,0.0 | ||
| gfx950,256,32,43008,5376,14,0,23.8462,a4w4_blockscale_256x32x128x128_16x16_16x16_8x32x1_8x32x1_1x16x1x16_8_2x2_intrawave_v3,620.54,4967.0,0.0 | ||
| gfx950,256,64,43008,5376,0,0,26.8131,a4w4_blockscale_256x64x128x128_16x16_16x16_8x32x1_8x32x1_1x32x1x8_8_2x2_intrawave_v3,1103.75,4523.26,0.0 | ||
| gfx950,256,128,43008,5376,43,0,33.1505,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_128x256E,1785.49,3829.79,0.0 | ||
| gfx950,256,256,43008,5376,44,0,42.9688,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_128x384E,2755.02,3218.93,0.0 | ||
| gfx950,256,512,43008,5376,50,0,72.1069,_ZN5aiter42f4gemm_bf16_per1x32Fp4_BpreShuffle_192x256E,3283.46,2233.1,0.0 |
67 changes: 67 additions & 0 deletions
67
aiter/configs/model_configs/gemma4_31b_a4w4_blockscale_untuned_gemm.csv
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| M,N,K | ||
| 16,16384,5376 | ||
| 16,5376,8192 | ||
| 16,43008,5376 | ||
| 16,5376,21504 | ||
| 16,20480,5376 | ||
| 16,5376,16384 | ||
| 32,16384,5376 | ||
| 32,5376,8192 | ||
| 32,43008,5376 | ||
| 32,5376,21504 | ||
| 32,20480,5376 | ||
| 32,5376,16384 | ||
| 64,16384,5376 | ||
| 64,5376,8192 | ||
| 64,43008,5376 | ||
| 64,5376,21504 | ||
| 64,20480,5376 | ||
| 64,5376,16384 | ||
| 128,16384,5376 | ||
| 128,5376,8192 | ||
| 128,43008,5376 | ||
| 128,5376,21504 | ||
| 128,20480,5376 | ||
| 128,5376,16384 | ||
| 256,16384,5376 | ||
| 256,5376,8192 | ||
| 256,43008,5376 | ||
| 256,5376,21504 | ||
| 256,20480,5376 | ||
| 256,5376,16384 | ||
| 512,16384,5376 | ||
| 512,5376,8192 | ||
| 512,43008,5376 | ||
| 512,5376,21504 | ||
| 512,20480,5376 | ||
| 512,5376,16384 | ||
| 1024,16384,5376 | ||
| 1024,5376,8192 | ||
| 1024,43008,5376 | ||
| 1024,5376,21504 | ||
| 1024,20480,5376 | ||
| 1024,5376,16384 | ||
| 2048,16384,5376 | ||
| 2048,5376,8192 | ||
| 2048,43008,5376 | ||
| 2048,5376,21504 | ||
| 2048,20480,5376 | ||
| 2048,5376,16384 | ||
| 4096,16384,5376 | ||
| 4096,5376,8192 | ||
| 4096,43008,5376 | ||
| 4096,5376,21504 | ||
| 4096,20480,5376 | ||
| 4096,5376,16384 | ||
| 8192,16384,5376 | ||
| 8192,5376,8192 | ||
| 8192,43008,5376 | ||
| 8192,5376,21504 | ||
| 8192,20480,5376 | ||
| 8192,5376,16384 | ||
| 16384,16384,5376 | ||
| 16384,5376,8192 | ||
| 16384,43008,5376 | ||
| 16384,5376,21504 | ||
| 16384,20480,5376 | ||
| 16384,5376,16384 | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32,16384,5376 not in tuned gemm csv. is this expected?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's expected. For (32, 16384, 5376) the tuner's best candidate was slower than the default: 15.98 µs against 15.53 µs (0.97x; the tuner's
--comparerow is below). That fails the >= 3% rule from #5421, so the row was dropped. It is one of 22 shapes in the untuned list with no tuned row.The missing row does not change dispatch. The lookup tries M = 32 as is, then
getPaddedMat gl 0 (32) and gl 1 (nextPow2, 32). None of those has a row, so the call keepsmain's default, the same as without this file. The re-time onmainagrees: 34.28 µs without this file and 35.24 µs with it, the same default kernel within noise.