Commit Graph

878 Commits

Author SHA1 Message Date
coderfeli
5d7c41af35 merge develop 2025-03-06 05:27:11 +00:00
feli
8d7c6cfeb5 Merge branch 'develop' into hot_fix_address_space 2025-03-06 09:36:18 +08:00
Illia Silin
a88bf76ecc Replace buffer load/store intrinsics with builtins (#1876)
* replace buffer load/store intrinsics with builtins

* fix clang format

* replace buffer load/store intrinsics with built-ins in ck_tile

* fix clang format

* add switch between buffer intrinsics and built-ins

* change the builtins threshold to clang20

* fix clang format

* fix some compilation errors

* revert changes in ck_tile

* revert changes in ck_tile

* delete all root files and folders when CI completes

* try changing the username in CI

* fix groovy syntax

* add user and group id info to ci dockers

* change ownership of all files in CI to jenkins at the end

* update changelog
2025-03-05 14:33:28 -08:00
Adam Osewski
4814db3905 [CK TILE] Fix KIterPerInnerLoop for block gemm. (#1934)
* Fix KIterPerInnerLoop

* Fix Kpack and KPerInnerLoop for block universal gemm.

* Fix overlooked spelling bugs.
2025-03-05 14:17:44 -08:00
Illia Silin
9b51c08bf7 remove support for gfx940 and gfx941 targets (#1944)
* remove support for gfx940 and gfx941 targets

* update changelog
2025-03-05 11:07:33 -08:00
coderfeli
08e902e2fa hot fix moe gemm2 2025-03-05 09:34:56 +00:00
feli
3786e16375 ck moe gemm implement (#1936)
* port all moe changes from ck_moe_gemm branch

* refine codes in the pr

* fix tail odd

* fix clang format

* fix clang format2

* make hot loop scheduler compatible with 16x16 and 32x32

* clang format

* fix per token quant

* rename moe example

* clang format

---------

Co-authored-by: coderfeli <coderfeli@163.com>
2025-03-05 15:56:55 +08:00
coderfeli
9dfb25fc7e Merge branch 'ck_moe_pr' into hot_fix_address_space 2025-03-05 07:13:56 +00:00
carlushuang
6b71ac0adb WA for address space by disable it completely 2025-03-05 11:32:07 +08:00
feli
4ab28424a2 Merge branch 'develop' into ck_moe_pr 2025-03-05 09:28:27 +08:00
coderfeli
f55cac672d rename moe example 2025-03-05 01:10:40 +00:00
jefyang1
c95bda93ba Remove CK_USE_AMD_MFMA_GFX950 (#1935)
* Add runtime check in example_gemm_xdl_streamk for gfx950

* Add runtime check in grouped conv fwd examples for gfx950

* Disable CK_USE_AMD_MFMA_GFX950

* Add new instances for gfx950

* Fix test_gemm_universal on gfx950
2025-03-04 10:32:25 -08:00
coderfeli
7cca528aa7 fix per token quant 2025-03-04 14:25:04 +00:00
coderfeli
ae3454f63a clang format 2025-03-04 09:22:57 +00:00
coderfeli
e426a6188d make hot loop scheduler compatible with 16x16 and 32x32 2025-03-04 09:20:41 +00:00
coderfeli
91dd6d49cc fix clang format2 2025-03-04 05:18:44 +00:00
coderfeli
9cee32c80d fix clang format 2025-03-04 03:53:58 +00:00
coderfeli
81d4b6cc64 fix tail odd 2025-03-04 03:52:53 +00:00
coderfeli
8755f31ea2 refine codes in the pr 2025-03-04 03:18:57 +00:00
coderfeli
8c7f6bfc37 port all moe changes from ck_moe_gemm branch 2025-03-04 02:40:33 +00:00
Juan Manuel Martinez Caamaño
57bb0e96a4 Missing _ in __HIPCC__ (#1930) 2025-03-03 08:19:47 -08:00
arai713
fd06ed926c MIGraphX hipRTC fix (#1923)
* fixed hiprtc compilation issues from new additions, removed clashing mixed precision functionality from codegen(ignore the whole file)

* fixed device op error: misplaced header guard

* restrict virtual function use in device_gemm_multiple_d file for codegen hiprtc compilation

* add CK_CODE_GEN_RTC flag for compilation, since this flag has wider coverage for hiprtc compilation

* fixed conditional error in amd_ck_fp8.hpp

* Add MaskOutUpperTriangle as a problem parameter to
BatchedGemmSoftmaxGemm and disable tests with
MaskOutUpperTriangle==True.

Signed-off-by: Mirza Halilcevic <mirza.halilcevic@amd.com>

---------

Signed-off-by: Mirza Halilcevic <mirza.halilcevic@amd.com>
Co-authored-by: Mirza Halilcevic <mirza.halilcevic@amd.com>
2025-03-03 07:55:05 -08:00
asleepzzz
ef16010273 Revert "[BlockScale GEMM] FP8 Blockscale GEMM optimization and ckProfiler (#1913)" (#1933)
This reverts commit 020148d0f7.
2025-03-03 07:17:39 -08:00
coderfeli
c311b28a40 merge ck moe merge 2025-03-03 14:58:15 +00:00
coderfeli
f83e7e138a fix build 2025-03-03 14:55:58 +00:00
coderfeli
a90527cc5a merge develop 2025-03-03 14:36:04 +00:00
coderfeli
405dbe630d merge ok; i4 support lds multiple shuffle ok 2025-03-02 13:33:02 +00:00
coderfeli
d0a1e4fa9f Merge branch 'ck_moe_new_sorting' into ck_moe_merge 2025-03-01 15:20:06 +00:00
coderfeli
41c3a70577 fix int4 moe 2025-03-01 15:19:03 +00:00
Bartłomiej Kocot
1bf29478cd [CK TILE] Fix double lds in ck tile gemm (#1924) 2025-02-28 08:07:53 -08:00
mtgu0705
d033ed5ec5 revert the v3r1_gather.hpp 2025-02-28 19:09:23 +08:00
mtgu0705
798af40467 remove some values between mfma instructions. 2025-02-28 14:56:21 +08:00
Bartłomiej Kocot
0356ee069e [CK TILE] Gemm pk_int4_t permute B (#1907)
* [CK TILE] Gemm pk_int4_t permute B

* Fixes
2025-02-27 11:01:14 +01:00
Bartłomiej Kocot
bf1e17007e [CK TILE] Block universal gemm lds<->vgpr optimizations (#1906)
* [CK TILE] Block universal gemm lds<->vgpr optimizations

* Rebase

* Fixes
2025-02-27 10:36:28 +01:00
coderfeli
1c52df6e1b insert one more mfma for block bpreshuffle v1 2025-02-26 09:19:19 +00:00
mtgu0705
29d9235bf3 for int4 moe2 for type_convert support. 2025-02-26 17:04:17 +08:00
mtgu0705
dd178ef79d Updated transfer_v3r1_gather to support pk_i4_t type. 2025-02-26 16:26:06 +08:00
coderfeli
895541b413 fix sorting update in ex kernel 2025-02-25 10:57:03 +00:00
aledudek
c9bcfd755e [CK_TILE] Add EnvLogging and missing gemm args checks (#1896)
* [CK_TILE] Add EnvLogging - refactor IsSupported error messages

* [CK_TILE] Add EnvLogging - wrap gemm kernel error messages

* [CK_TILE] Add EnvLogging - Add missing k_batch args check

* [CK_TILE] Add EnvLogging - remove debug log

* Add one check

* [CK_TILE] EnvLogging - add CK_TILE_ERROR logs

* [CK_TILE] EnvLogging quotes fix

* [CK_TILE] EngLogging use function instead of macro for err logs

* [CK_TILE] EnvLogging - refactor checking env var
2025-02-25 11:48:38 +01:00
carlushuang
353a612b44 [CK_TILE] add moe-sorting MP kernel (#1910)
* moe sorting ex

* fix bug for race condition

* fix bug and optimze large expert

* fix

* optimize with sub_token_oneshot

* support skip empty tokens for expert sorting

* update moe_sorting

* tidy code

* support mp kernel

* hint mp

* remove use less code

* porting to example 15

---------

Co-authored-by: valarLip <340077269@qq.com>
2025-02-25 17:56:55 +08:00
Haocong WANG
020148d0f7 [BlockScale GEMM] FP8 Blockscale GEMM optimization and ckProfiler (#1913)
* Added two kernel for M=32 problem

* Comment the first one

* Enable multiply_multiply for Scale_Block_M = 1 for deepseek

* Modify the a_thread offset since the A data load is different from B.

* edit fp8 ab scale for Scale_Block_M=1

* edit GemmSpec to MNKPadding

* enable blockwise pipelie v1 and v2. v1 is work for small K.

* add instance for gemm_ab_scale

* fix cmakelist of ckProfiler

* optimize blockscale gemm. todo: reduce vgpr usage

* fix a correctness bug

* sanity checked

* revert ckprofiler cmake changes

* clang format

* revert unnecessary changes.

* remove commented codes.

---------

Co-authored-by: mtgu0705 <mtgu@amd.com>
Co-authored-by: chenjun <junchen2@amd.com>
2025-02-25 15:42:20 +08:00
coderfeli
f0e703f07e mock sorting multikernel 2025-02-25 06:03:38 +00:00
coderfeli
d148949abd fix build err 2025-02-25 05:16:06 +00:00
coderfeli
0f911b61d2 merge pr1910 2025-02-25 05:12:06 +00:00
coderfeli
7ca2d03e82 merge moe sorting 2025-02-25 05:08:21 +00:00
coderfeli
d87ddebb30 revert back to v1 2025-02-25 03:06:55 +00:00
coconutruben
fcd4a6f3d1 device_prop.hpp - replace map with compile time hash and switch (#1898)
* device_prop.hpp - replace map with compile time hash and switch

Summary:

We replace a static const map with a compile time hash function
and a switch statement to achieve the same goal: translate names
to architectures. Most of these are very old, however the function
needs to continue to work.

Why? because the static map can cause issues when compiling into
libraries that get dynamically loaded/unloaded, leading to memory
corruption

Test Plan:

Running pytorch `torch.compile()` with CK enabled, and seeing it not
segfault on the 2nd kernel (1st reload of the library)

Reviewers:

Subscribers:

Tasks:

Tags:

* clang-format
2025-02-24 09:57:55 -08:00
coderfeli
6934ac0466 v3 ok 2025-02-24 14:35:16 +00:00
coderfeli
1648a5e029 merge 2025-02-24 11:50:30 +00:00
coderfeli
cf9be76c73 hot fix eid 2025-02-24 10:50:59 +00:00