Casey-Shi
4286eae09a
fix type hint ( #2254 )
2025-05-28 08:43:58 -07:00
Sami Remes
9bd01b624e
Remove extra if from CMakeLists.txt of gemm tests ( #2213 )
2025-05-28 15:25:09 +02:00
Khushbu Agarwal
99857e10e6
[CK_tile] Add rotating buffer feature for universal gemm ( #2200 )
...
* Add rotating buffer feature for universal gemm
* adding changes in tile_engine
* Updated code to merge kernel_launch
* removing comments
* Enable rotating buffer changes to flatmm
* Created diff launch_kernel function for rotating buffer
* Simplfied calculation using macros
* merge code with new changes in tile_engine
* clang formatted
* Redefine macros
2025-05-27 23:00:58 -07:00
Aviral Goel
c52649ad57
Add catch blocks in example GEMM apps to enable better error handling (Issue: 1928) ( #2234 )
...
* added catch statements to examples
* clang format
2025-05-27 22:32:42 -07:00
Qianfeng Zhang
10c35125d2
Add example parameter max_seqlen and max_target
2025-05-27 14:43:43 +00:00
dependabot[bot]
132bd5b874
Bump rocm-docs-core[api_reference] from 1.18.4 to 1.19.0 in /docs/sphinx ( #2237 )
...
Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core ) from 1.18.4 to 1.19.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases )
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md )
- [Commits](https://github.com/ROCm/rocm-docs-core/compare/v1.18.4...v1.19.0 )
---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
dependency-version: 1.19.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 06:53:12 -07:00
Qianfeng Zhang
c9e19351c7
Update to the method for calculating max_seqlen in the example
2025-05-27 10:38:52 +00:00
Casey-Shi
128f5a1eab
[Tile Engine] Add benchmark for tile engine gemm. ( #2193 )
...
* initial commit -m benchmark
* only support profile
* fix
* fix doc
* add default config
* add ci
* fix cmake
* tmp save for gen blobs
* fix bug
* merge
* range config
* test success
* fix
* fix
* move struct
* remove config property
* fix config
* remove comment
* add cmake option & modify
* add changelog
* fix
* format
* add pydantic module to the docker image
* fix
* add benchmark for cold and warmp up
* python format
* add asm cache control
* fix README
* remove pydantic module
* modify changelog
* fix config
* recover benchmark_gemm and fix
* format python
* refactor profiler
* fix csv bug
* fix codegen bug
* add kernel instance object
* add benchmark gemm executable
* fix jenkins & delete extra header
* disable warning output & enable default config
* Disable sparsity for invalid warp tile combinations
* fix gemm host template func
* refactor gemm profiler
* filter out some inmstances
* default config test & fix codegen bug
* add sparse flag to gen more instances
---------
Co-authored-by: illsilin <Illia.Silin@amd.com >
Co-authored-by: khuagarw <khuagarw@amd.com >
Co-authored-by: Thomas Ning <Thomas.Ning@amd.com >
2025-05-26 22:32:36 -07:00
Po Yen Chen
c42b957d65
[CK_TILE] For FMHA forward kernels, assign block indices reversely if using mask ( #2209 )
...
* Assign block indices reversely if kHasMask=true
* Assign block indices reversely for splitkv kernel
2025-05-27 10:58:58 +08:00
Yi DING
5727af98d1
Add operator/instance filters to ckProfiler ( #2233 )
2025-05-27 09:51:20 +08:00
Bartłomiej Kocot
b1ed92b131
Revert "Remove not needed bwd wei merged groups instances ( #2218 )" ( #2235 )
...
This reverts commit 4583aeffad .
2025-05-26 23:26:04 +02:00
Bartłomiej Kocot
4583aeffad
Remove not needed bwd wei merged groups instances ( #2218 )
...
* Grouped conv bwd wei add two stage instances for larger filter and Merge Groups
* Fix
* fix
* Revert "Restore oddc instances (#2201 )"
This reverts commit 6342f6b5e8 .
* fix
---------
Co-authored-by: Rostyslav Geyyer <46627076+geyyer@users.noreply.github.com >
2025-05-26 22:46:18 +02:00
Bartłomiej Kocot
037764bbc6
Fix grid size calc for bwd wei ( #2226 )
2025-05-26 16:51:09 +02:00
Qianfeng Zhang
dc0977faad
Use NRepetitions2DEpilogue for outputing o_acc tile
2025-05-26 14:43:30 +00:00
Zzz9990
ece38b9d7a
[VLLM V1] Add chunked prefill for FA to pass seq with small seqlen_q ( #2221 )
...
* fix splitkv compiler issue since lse is used to select kernel instances
* bypass seqlen == 1
* add chunked prefill into mha varlen
This reverts commit aa9847e42d .
* skip compile when receipt 2-4 and add comments
* fix
---------
Co-authored-by: fsx950223 <fsx950223@outlook.com >
2025-05-26 19:17:18 +08:00
Illia Silin
8146e471f1
fix the buffer intrinsic names for clang >=20 ( #2228 )
2025-05-23 14:58:25 -07:00
Illia Silin
1b846143c6
Revert "Update the buffer load/store intrinsic names for clang>=20. ( #2192 )" ( #2227 )
...
This reverts commit 58f9e9ffbc .
2025-05-22 15:41:17 -07:00
Illia Silin
bc2551ac3b
disable building device_mha_operations by default ( #2225 )
2025-05-22 14:03:04 -07:00
Adam Dickin
417a6b65b6
Add MIOPEN_REQ_LIBS_ONLY option for cmake to build only the libs MIOpen requires ( #2224 )
...
* cut out anything we dont need for MIOpen to test
* refactor exclusion code to be more streamlined.
2025-05-22 11:14:33 -07:00
Qianfeng Zhang
81f7b139e0
Use LDS to in-directly load Q-tile to enable dwordx4 loading and avoid cachelines wasting
2025-05-22 09:49:11 +00:00
Aviral Goel
534d4594d0
Refactor tile_window.hpp, tile_window_linear.hpp into a CK Tile Hierarchy ( #2214 )
...
* window_origin variable now in base class
* abstracted more functions
* consolidated tile_window_static_distribution and tile_window_static_lengths
* clang format
* skeleton code for tile_window and tile_window_linear consolidation
* more abstraction
* moved variables from child to parent
* clang format
* removed comments
* removed debug code
* removed debug code
* abstracting traits WIP
* consolidated traits
* removed comments and clang formatted
2025-05-21 23:28:00 -07:00
Bartłomiej Kocot
ebc5a6ef87
Grouped conv bwd wei add for larger filter and Merge Groupes optimization ( #2197 )
...
* Grouped conv bwd wei add two stage instances for larger filter and Merge Groups
* Fix
* fix
* Restore removed instances
---------
Co-authored-by: Rostyslav Geyyer <46627076+geyyer@users.noreply.github.com >
2025-05-21 22:47:34 +02:00
Aviral Goel
fa39c4e798
Add Doxygen Documentation for HostTesnor, HostTensorDescriptor, DeviceMem, FillUniformDistribution ( #2160 )
...
* added documentation for HostTensorDescriptor
* added documentation for DeviceMem and FillUniformDistribution
* fixed merging error
* fixed host_tensor_descriptor error
* clang format
2025-05-21 10:34:30 -07:00
Aviral Goel
990d645578
added gemm universal example in readme ( #2216 )
2025-05-20 15:35:07 -07:00
SamiAario-AMD
380bca2b85
Fix 11_add_rmsnorm2d_rdquant ( #2207 )
2025-05-20 15:15:28 -07:00
Thomas Ning
1386924749
Add the instances for small sized GEMM in preshuffle and improve CMake Flag ( #2212 )
...
* Add small instance, add the bug fix, & improve the example CMake
* clang format
2025-05-20 15:05:08 -07:00
Sami Remes
d1e6f0982d
[CK_TILE] Grouped GEMM tile loop ( #2146 )
...
* Add trait to use a persistent kernel and split the entrypoints in grouped gemm
* Some helper functions for persistent kernel case
* Get max occupancy grid using device properties
* Implement tile loop in main entry point to grouped gemm
* Enable GridSize() on device
* Handle offset tile index using real current block index
* Add persistent kernel choice to grouped gemm example
* Use a for-loop for iterating over the group
* Reduce VGPR spills by early-exit
* Enable persistent kernel choice in grouped_gemm example
* Add persistent kernel option to grouped_gemm test
* Fix formatting with remod.py
* Remove GridUpdateBlocks as blocks are now iteratively computed
* Add comment about VGPR spilling
* Fix formatting
* Use CK_TILE_HOST instead of __host__
* Enable all Row/Col combinations in grouped gemm unit test
* Add some KBatch=2 cases to grouped gemm tests
* Fix SplitK for grouped gemm
* Enable pipeline hotloop/tailnumber selection in-kernel for grouped gemm
* Add type traits
* Split examples to regular and tileloop
* Formatting
* Use hipExtStreamGetCUMask to get current active CUs for the given stream
* Align test and example kernel config, and disable validation for splitk repeats
* Remove debug options from CMakeLists.txt
* Separate the code paths for persistent/non-persistent in test
* Fix formatting
* Address review comments
---------
Co-authored-by: Adam Osewski <19374865+aosewski@users.noreply.github.com >
2025-05-20 17:18:57 +03:00
Qianfeng Zhang
a1346aaf3e
Update the reference hstu to not do fp32 to fp16/bf16 conversion before P@V gemm
2025-05-20 07:53:25 +00:00
Qianfeng Zhang
0a8ea6bd02
Adjust the threshold values for fp16/bf16 in the example
2025-05-20 07:52:37 +00:00
Qianfeng Zhang
29cf1610f1
Enable RTN fp32 to bf16 conversion by adding compiler option in CMakeLists.txt
2025-05-20 07:52:01 +00:00
Aviral Goel
c4929225f6
remove debug statements from CMakeLists ( #2204 )
2025-05-19 17:31:04 -07:00
Jan Patrick Lehr
0970f22221
[CMake] Disable newly added compiler warning -Wnrvo ( #2210 )
...
Recently a new warning was added to Clang to warn when no copy-elision
on return happens. That prevents our CK build. This disables the
warning.
2025-05-19 17:30:15 -07:00
jefyang1
f18170064d
Use new mfma instructions for FP8 on gfx950 ( #2202 )
...
* Add logic to use new mfma instructions for fp8 bf8
* Fix example_gemm_xdl_fp8_pk_i4_bpreshuffle_v3 on gfx950 and run clang format
* Update include/ck/tensor_operation/gpu/warp/xdlops_gemm.hpp
Co-authored-by: Andriy Roshchenko <107577548+andriy-ca@users.noreply.github.com >
* Fix intrin_mfma f8 calls due to merge mistake
---------
Co-authored-by: Andriy Roshchenko <107577548+andriy-ca@users.noreply.github.com >
2025-05-19 17:29:51 -07:00
Andriy Roshchenko
57e0f5df29
MX GEMM - Expand MX MFMA Testing to BF8, FP6, and BF6 Data Types ( #2199 )
...
* Unify test interface for different layouts.
* WIP: Introducing FP4/FP6/FP8 abstractions
* WIP: Introducing packed storage abstraction
* WIP: Introducing packed storage abstraction
* WIP: Improved support for FP6 data type
* Refactor packed storage for f6_t
* WIP: FP6 MFMA test
* Test if we correctly represent all FP6/FP4 numbers
* Additional output for failed FP4 test.
* More failing conversion tests
* Even more failing conversion tests
* Working FP6 MFMA tests
* Expand MX MFMA testing to BF8/6
* Update and verify MX MFMA test for packed types
* Fix fp4 and fp6 conversions on host
* Working MX MFMA tests for FP8/6/4
* Cleanup
* Add missing type
* Cleanup
* Final cleanup
* Restrict FP6/4 values output to CK_LOGGING=1
* Use CHAR_BIT instead of number 8
* Fix typo
* Remove FP6 and FP4 from the list of native types
---------
Co-authored-by: Rostyslav Geyyer <rosty.geyyer@amd.com >
2025-05-19 16:52:51 -05:00
jefyang1
b8b12bb81e
Fix example_grouped_gemm_multiple_d_xdl_fp16 on gfx950 ( #2203 )
...
* Fix example_grouped_gemm_multiple_d_xdl_fp16 on gfx950
* Run clang format
2025-05-19 14:25:50 -07:00
Qianfeng Zhang
fac03abbda
Change do-while main-loop to while-do and remove early exiting check
2025-05-19 15:39:31 +00:00
Qianfeng Zhang
14ab6f154d
Adjust the codes before the main-loop
2025-05-19 13:59:57 +00:00
Qianfeng Zhang
f411d676f2
Move k_tile loading and v_tile loading earlier in the loop
2025-05-19 13:59:24 +00:00
Qianfeng Zhang
902b1c645c
Move k_tile loading in the loop earlier
2025-05-19 13:58:43 +00:00
Qianfeng Zhang
f582c21418
Replace s_acc and pcomp tile array by single tile object for simplification
2025-05-19 13:57:11 +00:00
Qianfeng Zhang
4e65469fe8
Add _builtin_amdgcn_sched_barrier(0) for instructing the compiler for better codes isolation
2025-05-18 16:20:47 +00:00
Qianfeng Zhang
e4e70f8b0a
Set the block_per_cu to 3 for hdim-128
2025-05-18 15:58:57 +00:00
Qianfeng Zhang
ff3415d97d
Prefetch b_warp_tensor for next nIter and move b_warp_windows construction into n-iteration in block_gemm_areg_bsmem_creg for gemm-1
2025-05-18 15:26:31 +00:00
Qianfeng Zhang
694295a9d3
Move b_warp_windows construction into k-iteration in block_gemm_areg_bsmem_creg for gemm-0
2025-05-18 15:25:43 +00:00
Qianfeng Zhang
afd7793e92
Prefetch K for next iteration from LDS in block_gemm_areg_bsmem_creg for gemm-0
2025-05-18 15:25:05 +00:00
Qianfeng Zhang
7c0ac51b4b
Hack block_gemm_areg_bsmem_creg_v2 for gemm_1
2025-05-18 15:24:17 +00:00
Qianfeng Zhang
473fbc374b
Rename the hacked block_gemm_areg_bsmem_creg_v2
2025-05-18 15:23:40 +00:00
Qianfeng Zhang
58e45ec53a
Move the lambda for dividing by max_seqlen from kernel to pipeline
2025-05-18 07:58:52 +00:00
Qianfeng Zhang
0771390a28
Move the dividing by max_seqlen out of f_silu to be handle outside the main-loop
2025-05-18 03:41:31 +00:00
Bartłomiej Kocot
6342f6b5e8
Restore oddc instances ( #2201 )
2025-05-16 18:42:02 -07:00