Kevin Choi
598e3fec41
remove innerloop, move restrict parameters to mainloop and add noinline attribute.
2025-08-14 12:11:17 +00:00
Kevin Choi
3340408537
Create inner lambda with restrict parameters, add restrict to some parameters
2025-08-14 07:06:51 +00:00
aska-0096
3bc45ecbc7
save for debug
2025-08-14 03:43:54 +00:00
aska-0096
de4db6c4c5
Merge branch 'wip-async-tr-fa' of https://github.com/ROCm/composable_kernel into wip-async-tr-fa
2025-08-13 02:15:22 +00:00
aska-0096
108abf00e0
Merge branch 'develop' of https://github.com/ROCm/composable_kernel into wip-async-tr-fa
2025-08-13 02:14:26 +00:00
Thomas Ning
0f42a92fc1
Finish the grouped gemm restructure with fp8 data type ( #2655 )
...
* Finish the grouped gemm restructure with data type
* restore gemm_utils.hpp
* Update example/ck_tile/17_grouped_gemm/run_grouped_gemm_example.inc
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Comment Addressed
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-08-12 18:23:34 -07:00
Thrupti Raj Lakshmana Gowda
3f57ec3d2d
GEMM Multi D for CK Tile Engine ( #2660 )
...
* Readme for GEMM Multi D
* GEMM Multi D partial Progress
* GEMM Multi D partial Progress!
* CK Tile Engine GEMM Multi D : All Python files generated
* Partial Progress
* Partial Progress
* Partial Progress
* Partial Progress : Incorrect Result
* Partial Progress : Debugging
* Partial Progress : Correct Results
* Partial Progress - Incorrect Results
* Partial Progress - Commenting Passthrough bypass logic
* Changing Passthrough to MultiplyMultiply
* Correct Results!
* Fix and debug the pass through feature
* Sample commit
* Correct Results : MultiplyMultiply
* Code Cleanup
* Removing Failed Instances
* Working code before Unary element support
* Custom Elementwise Function support and working implementation for Mul and Add
* Updating README
* Working for Passthrough
* Review Comments : Minor Fixes
* Review Comments : Minor Fixes
* Readme Updated
* Partial Changes after Rebase
* Working Code : Changes after Rebase
* Updating Jenkins file
* Removing default value changed while testing
* Configuration changes in config files
* Tile Handler changes in GEMM Multi D Tile Engine
* Tile Handler changes in GEMM Multi D Example
* Change log for Gemm Multi D in CK Tile Engine
* Configuration changes in config files
---------
Co-authored-by: ThomasNing <thomasning@amd.com >
2025-08-12 16:05:05 -07:00
Geo Min
30dafe8281
[TheRock CI] Adding TheRock CI gate check ( #2648 )
...
* Adding initial TheRock CI
* Adding composable kernel link
* Adding correct repo for rocm-libraries
* Adding entire rocm-libraries checkout
* Adding correct flag
* Adding correct flag for fetch sources
* Fixing git health
* Removing patch
* Removing patching
* Removing manual check
* PR comments
* testing without dist
* Removing test branch
* PR comments
* PR comments
* PR comment
* Adding test_runs_on
2025-08-12 14:13:01 -07:00
joyeamd
0856b3f4a2
[CK_TILE]fix ck_tile's moe_sorting example in gfx11 ( #2667 )
...
* fix ck_tile's moe_sorting example in gfx11
* fix clang format
---------
Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com >
2025-08-12 12:33:56 -07:00
Illia Silin
bbf41b27f2
fix builds with mainline/staging compilers ( #2674 )
2025-08-12 10:23:08 -07:00
asleepzzz
68694cb781
Merge branch 'develop' into wip-async-tr-fa
2025-08-13 00:34:11 +08:00
slippedJim
20288caa2f
remove bad pipeline codegen ( #2673 )
2025-08-13 00:23:40 +08:00
aska-0096
0810799e25
refactor blockgemm change, isolate to v2;
2025-08-12 14:25:50 +00:00
asleepzzz
5b39de4bb6
Revert "Optimize fmha fwd decode & prefill for gfx950 ( #2641 )" ( #2670 )
...
This reverts commit b7322a521a .
2025-08-12 20:27:10 +08:00
Haocong WANG
b7322a521a
Optimize fmha fwd decode & prefill for gfx950 ( #2641 )
...
* Fix for fwd/bwd kernel build filter
* fix bwd code
* save an example for __bf16 type
* temp save, waiting for debug
* tempsave, fmha_decode
* temp save, change all instance to 1wave
* fix async copytest bug
* Add block_sync_lds_direct_load utility
* fix the s_waitcnt_imm calculation
* Improve s_waitcnt_imm calculation
* fix vmcnt shift
* add input validation and bug fix
* remove unnecessary output
* move test_copy into test
* temp save
* tempsave
* compile pass
* tempsave, trload+asyncload done
* tempsave. asynccopy+trload sanity checked
* remove unnecessary features
* fix the lds alignment caused performance regression
* enable prefill overload operator().
* remove all lds bankconflict with xor layouts
* enable larger tile size; upgrade xor pattern
* upgrade prefill pipeline; simple iglp; consistent data produce and consume order
* small refactor
* Load Q through lds, implement xor;
* add vmcnt guard before load ktile
* Add v_permlaneb32 for block_reduce. Disable it as it will cause un-coexecutable packed math in FA
* Add XOR fold strategy for hdim<128, but perf dropped; disable it by default; wait further perf debug
* add __restrict__ to tr load
* merge fa_decode pipeline into fmha_fwd api
* remove unnecessary files; rename some files
* Remove unnecessary changes
* bug fix, clang format;
* remove non-necessary change
* fix clangformat with 18.1.3
* fix bugs
* fix bug
* fix bug on non-gfx950
* fix bugs in gemm
* fix bug in pki4
* tempsave, update the blocksync functions
* change the warp setting for hdim32 fmha fwd
* clang format
* fix conflict. disable all v-col instance for fmha fwd
* Fix the bug
* clang format
---------
Co-authored-by: Max Podkorytov <4273004+tenpercent@users.noreply.github.com >
2025-08-12 19:43:14 +08:00
Mateusz Ozga
c0c2ded566
fix ( #2668 )
2025-08-12 13:02:10 +02:00
aska-0096
fd1eb323af
clang format
2025-08-12 09:26:13 +00:00
aska-0096
75f6f6bac4
Merge branch 'develop' of https://github.com/ROCm/composable_kernel into wip-async-tr-fa
2025-08-12 09:04:41 +00:00
Yi DING
8e1eb0c1ee
[CK_TILE] FMHA BWD Decode Pipeline ( #2643 )
...
* Fix distr
* Duplicate block_fmha_bwd_dq_dk_dv_pipeline_trload_kr_ktr_vr
* decode 16x16 o2
2025-08-12 17:02:52 +08:00
aska-0096
bcc05eee62
Fix the bug
2025-08-12 08:46:06 +00:00
Cameron Shinn
352f87e684
Fix num_byte calculations to use nhead_k for K & V size ( #2653 )
...
Simple fix just to calculate the number of bytes correctly for what's reported in the output. I was getting 6200 GB/s which is past the SoL of MI300.
Before:
```
./bin/tile_example_fmha_fwd -prec=bf16 -b=2 -s=1 -s_k=32768 -h=32 -h_k=8 -d=128 -page_block_size=128 -num_splits=8 -iperm=0 -operm=0 -v=0 -kname=1
[bf16|batch|bshd] b:2, h:32/8, s:1/32768, d:128/128, scale_s:0.0883883, bias:n, p_drop:0, lse:0, squant:0, mask:n, v:r, num_splits:8, page_block_size:128, fmha_fwd_splitkv_d128_bf16_batch_b16x64x64x128x64x128_r1x4x1_r1x4x1_w16x16x16_w16x16x16_qr_nwarp_sshuffle_vr_ps_nlogits_nbias_nmask_lse_nsquant_pagedkv, fmha_fwd_splitkv_combine_d128_bf16_batch_b32_unused_ps_nlse_nsquant, 0.173 ms, 6.20 TFlops, 6202.95 GB/s
```
After:
```
./bin/tile_example_fmha_fwd -prec=bf16 -b=2 -s=1 -s_k=32768 -h=32 -h_k=8 -d=128 -page_block_size=128 -num_splits=8 -iperm=0 -operm=0 -v=0 -kname=1
[bf16|batch|bshd] b:2, h:32/8, s:1/32768, d:128/128, scale_s:0.0883883, bias:n, p_drop:0, lse:0, squant:0, mask:n, v:r, num_splits:8, page_block_size:128, fmha_fwd_splitkv_d128_bf16_batch_b16x64x64x128x64x128_r1x4x1_r1x4x1_w16x16x16_w16x16x16_qr_nwarp_sshuffle_vr_ps_nlogits_nbias_nmask_lse_nsquant_pagedkv, fmha_fwd_splitkv_combine_d128_bf16_batch_b32_unused_ps_nlse_nsquant, 0.163 ms, 6.58 TFlops, 1644.53 GB/s
```
2025-08-12 13:44:01 +08:00
aska-0096
96d24497f5
fix conflict. disable all v-col instance for fmha fwd
2025-08-12 04:02:41 +00:00
aska-0096
1716171be4
Merge branch 'develop' of https://github.com/ROCm/composable_kernel into wip-async-tr-fa
2025-08-12 03:52:34 +00:00
Yi DING
4fde1646e5
[CK_TILE] FMHA BWD Optimization For GFX950 ( #2628 )
...
* simplify fmha_bwd_kernel MakeKargs & dq_dram_window
* simply duplicate
* trload pipeline
* Try two-stage
* add prefetch
* optimize & iglp
2025-08-12 11:11:55 +08:00
aska-0096
1c98007901
clang format
2025-08-12 01:53:31 +00:00
aska-0096
f43e903b1d
Merge branch 'develop' of https://github.com/ROCm/composable_kernel into wip-async-tr-fa
2025-08-12 01:52:52 +00:00
Aviral Goel
a7badc6ec5
feat(copy_kernel): add basic copy kernel example with beginner friendly documentation ( #2582 )
...
* feat(copy_kernel): add basic copy kernel example with documentation
* docs(CHANGELOG): Updated changelog
* chore: performed clang format
* Update example/ck_tile/39_copy/copy_basic.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update example/ck_tile/39_copy/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update example/ck_tile/39_copy/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update example/ck_tile/39_copy/README.md
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com >
* Update example/ck_tile/39_copy/README.md
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com >
* Update example/ck_tile/39_copy/README.md
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com >
* fix(terminology): follow amd terms
* extract elementwise copy to a new kernel
* fix(copy_kernel): bug in verification
* add comments about vgpr usage
* lint and nits
* add notes and comments
* print hostTensor via stream
* print hostTensor via stream
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com >
2025-08-11 10:54:37 -07:00
Illia Silin
6bfef63414
enable aiter test_mha in daily CI ( #2659 )
2025-08-11 09:50:33 -07:00
aska-0096
3868ddd708
Merge branch 'develop' of https://github.com/ROCm/composable_kernel into wip-async-tr-fa
2025-08-11 15:59:40 +00:00
aska-0096
498d234ab8
change the warp setting for hdim32 fmha fwd
2025-08-11 15:37:37 +00:00
aska-0096
b86f7786e2
tempsave, update the blocksync functions
2025-08-11 14:21:09 +00:00
Yashvardhan Agarwal
191c62967b
Fixes to "General 2D Reduction Kernel" ( #2535 ) ( #2656 )
...
* fix reduce2d
- revret the combine_partial_results() chnages
- remove auto from function def
* clang-format
2025-08-11 15:01:33 +02:00
geozhai
1e1ee758fa
update CK build instruction step 4 ( #2563 )
...
Co-authored-by: Aviral Goel <aviral.goel@amd.com >
2025-08-11 00:26:13 -04:00
aska-0096
7b8052d7ca
fix bug in pki4
2025-08-10 06:00:51 +00:00
aska-0096
76cbbb84a2
fix bugs in gemm
2025-08-09 03:25:12 +00:00
aska-0096
8c101ccb88
fix bug on non-gfx950
2025-08-08 18:35:53 +00:00
aska-0096
efb8549279
fix bug
2025-08-08 17:53:19 +00:00
Illia Silin
8613aa1e40
remove ck_tile transpose and gemm stages from CI ( #2646 )
2025-08-08 10:48:44 -07:00
Illia Silin
7ac850ac72
Add daily AITER tests on gfx942. ( #2639 )
...
* add option to select aiter branch, add tests on gfx942
2025-08-08 09:30:46 -07:00
aska-0096
729e8785fb
fix bugs
2025-08-08 15:42:15 +00:00
aska-0096
250dc13c75
fix clangformat with 18.1.3
2025-08-08 09:31:01 +00:00
aska-0096
106edeecd9
remove non-necessary change
2025-08-08 09:07:40 +00:00
aska-0096
78edd7303b
bug fix, clang format;
2025-08-08 09:04:02 +00:00
aska-0096
3b9fb6af38
Remove unnecessary changes
2025-08-08 08:08:03 +00:00
aska-0096
6bb57c2c57
Merge branch 'develop' of https://github.com/ROCm/composable_kernel into wip-async-tr-fa
2025-08-08 07:50:12 +00:00
aska-0096
1ecee378d5
remove unnecessary files; rename some files
2025-08-08 06:19:31 +00:00
aska-0096
b4640a9de6
merge fa_decode pipeline into fmha_fwd api
2025-08-08 05:46:18 +00:00
Max Podkorytov
ab26026835
[CK-tile] add more tests for batched transpose testing the rectangular block tile sizes ( #2634 )
...
* add failing tests
* swap out and reference
* add constraint assert to transpose input distribution
* test both pipelines with rectangular block tile
* print mismatched indices
* add a smaller failing test for old pipeline
* print grid and block
* fill output before operating on it
* swap m/n tile sizes and make one test pass
* add device syncs
* add one more flipped test case
* flip block tile at host arg init
* fix tiles for lds pipeline
* clang-format
* rename tests
* roll back error check
* remove device syncs
* reduce large test case's size
2025-08-07 16:51:53 -07:00
Sami Remes
3c9400471d
[CK_TILE] Enable persistent kernel and tail handler in tile_engine ( #2300 )
...
* Enable persistent kernel in tile_engine and use tail handler
* Fix formatting
* Add persistent to default_config.json
* Remove extra newlines and add persistent also to user config
* Reduce instances from default_config.json
* add persistent to benchmark.json and custom_ci_config.json
* changed the config file to have few instances
---------
Co-authored-by: Thomas Ning <Thomas.Ning@amd.com >
Co-authored-by: ThomasNing <thomasning@amd.com >
2025-08-07 16:03:49 -07:00
Gino Lu
5d6d236b25
Add e8m0 scaled convert into CK_TILE ( #2617 )
...
* first commit
* remove redundent code
* modify according to comments.
* fix type_convert error with scaled_type_convert
2025-08-07 21:37:28 +08:00