Commit Graph

2181 Commits

Author SHA1 Message Date
Ville Pietilä
79fbb63d57 Improve tensor slice transfer tests. 2025-08-19 13:53:44 +00:00
Ville Pietilä
19439dc88a Consolidate tensor slice transfer tests. 2025-08-18 12:10:29 +00:00
Ville Pietilä
b48ae7e447 Add perf test. Fix packed bf16 cast implementation. 2025-08-18 11:37:14 +00:00
Ville Pietilä
6b2b5e7c7c Small optimization to the packed cast. 2025-08-18 06:39:26 +00:00
Ville Pietilä
d7c681f2f2 Add more tests for packed cast. 2025-08-18 06:39:04 +00:00
Ville Pietilä
c0b8f66674 Add packed cast pipeline into gridwise gemm xdlops bwd weight. 2025-08-18 06:10:14 +00:00
Ville Pietilä
00a3ce734a Integrate new packed cast threadwise tensor slice transfer into gridwise gemm pipelines. 2025-08-15 12:06:44 +00:00
Ville Pietilä
6374e16a43 Improve tensor slice transfer test. 2025-08-15 11:18:10 +00:00
Ville Pietilä
51af3d7bac Fix a bug in the packed cast threadwise transfer. 2025-08-15 10:41:06 +00:00
Ville Pietilä
8bf579a191 Improve sequence test. 2025-08-15 07:51:40 +00:00
Ville Pietilä
62c66a7d9c WIP: packed bf16 cast v3. 2025-08-14 12:39:18 +00:00
Ville Pietilä
938ff298b4 Add more unit tests. 2025-08-14 11:33:02 +00:00
Ville Pietilä
3ecc8aae74 Add unit test for vectorized packed cast. 2025-08-14 08:41:35 +00:00
Ville Pietilä
bf47c623b3 Add unit tests for vector_type. 2025-08-14 06:20:36 +00:00
Ville Pietilä
ade741dd45 WIP: PackedCast v3. 2025-08-13 15:13:35 +00:00
Ville Pietilä
11baf3de0c Added an integration test for a tensor slice transfer. 2025-08-13 13:35:07 +00:00
Ville Pietilä
50e318e072 Fix logging. 2025-08-12 15:53:00 +00:00
Ville Pietilä
ae4c727bc5 Add packed bf16 cast for universal GEMM. 2025-08-12 15:52:49 +00:00
Ville Pietilä
cee7644c85 Working version 2 of the packed cast. 2025-08-12 12:46:01 +00:00
Ville Pietilä
6148d1c75f WIP: Packed cast v2. 2025-08-11 15:18:30 +00:00
Ville Pietilä
e701f8fac1 Time kernels in testing. 2025-08-11 10:16:37 +00:00
Ville Pietilä
b9a8dbc720 Fix analysis script. 2025-08-11 10:08:32 +00:00
Ville Pietilä
39e7ae88e3 Performance analysis script. 2025-08-11 09:54:16 +00:00
Ville Pietilä
c675563468 Addlogging and specific unit tests for bf16 and gfx950. 2025-08-08 08:59:12 +00:00
Ville Pietilä
c47b80580d Fix build issues when __gfx950__ macro is enabled. 2025-08-08 08:01:42 +00:00
Ville Pietilä
4b8a559da9 Fixed packed_cast implementation for slice access. 2025-08-06 11:04:29 +00:00
Ville Pietilä
44202b9d32 WIP: Integration of packed cast into gridwise_gemm_xdl_cshuffle_conv_v3. 2025-08-05 15:12:36 +00:00
Ville Pietilä
e92c0bf68e Initial integaration of packed cast. 2025-08-04 15:34:35 +00:00
Ville Pietilä
590e119828 Add unit tests for PassThroughPack2. 2025-08-04 11:28:31 +00:00
Ville Pietilä
e06548675f Fix a bug in packed cast asm. Add more unit tests. 2025-08-04 09:16:12 +00:00
Ville Pietilä
9769fa68a7 Packed BF16 cast with asm volatile. 2025-08-01 13:22:41 +00:00
Ville Pietilä
b2b991d431 Added conversion of two floats into a packed bf16 value. 2025-07-31 15:13:37 +00:00
Ville Pietilä
e962a41638 Automatic deduction of split-K value for grouped convolution (#2491)
* Split-K autodeduction for DeviceGroupedConvBwdWeight_Xdl_CShuffle and DeviceGroupedConvBwdWeight_Xdl_CShuffleV3.

* Split-K autodeduction for DeviceGroupedConvBwdWeightTwoStage_Xdl_CShuffle.

* Use simple best occupancy model to calculate the split-K.

* Handle split-K autodeduction in explicit gemm conv.

* Add unit tests for split-K autodeduction.

* Remove oversubscription.

* Small fixes.

* Added split-K autodeduction for DeviceGroupedConvBwdWeightMultipleD_Xdl_CShuffle.

* Run clang formatting.

* Fix error handling in the conv profiler.

* Add missing documentation for the autodeducted split-K values.

* Add split-K autodeduction to DeviceGroupedConvBwdWeight_Explicit_Xdl solver.

* Fix clang formatting and split-K profiler documentation.

* Rename max_occupancy value variable.

* Calculate grid size for split-K autodeduction directly from input array shapes and template params.

---------

Co-authored-by: Ville Pietilä <>
2025-07-31 12:08:45 +02:00
Anton Gorenko
7b074249f4 [CK_TILE] Fix UB and corner cases in f32/f16 to/from f8 conversion (#2571)
* Add tests for host convesion f32/f16 to f8

* Add tests for host convesion from f8 to f32/f16

* Fix UB and corner cases in f32/f16 to/from f8 conversion

* There are UBs when very small values are converted to f8: bitshifts
  can be larger that type width. Using unsigned long long does not help
  because exponent_diff >= 64 in such cases. This causes that values
  like 2.117582368e-22 are converted to non-zero f8 in host validation
  of FMHA tests, test_f8 crashes with segfault in completely irrelevant
  code like GTest internals or produces non-deterministic results etc.
* Fix FNUZ conversion to return NaN for NaN inputs.
* Fix compilation error (due to uint8_t << 8) in OCP e5m2 to f16
  conversion.

* Replace some magic numbers with values from numeric_traits

* Build tests only on devices supporting the type
2025-07-31 09:54:17 +05:00
Illia Silin
e8709c24f4 upgrade clang-format version in install_precommit.sh (#2589) 2025-07-30 08:02:25 -07:00
Max Podkorytov
de0cdb4c31 [CK-tile] add gtest for ck-tile batched transpose kernels (#2585)
* add a dummy test file

* add kernel launch logic to the test

* transfer all test cases into gtest params

* factor kernel out into test config

* add load transpose pipeline tests

* add padded tests and skip invalid kernels at runtime

* enum class for pipeline type

* add multiwarp test cases

* fix type

* try to solve the problem

---------

Co-authored-by: ThomasNing <thomas.ning@amd.com>
2025-07-30 07:31:05 -07:00
Gino Lu
b25d512e8a add constexpr to pk_fp4::pack/unpack() (#2586) 2025-07-30 10:29:04 -04:00
Khushbu Agarwal
61e21f5567 Update to gpu_timer for rotating_buffer (#2524)
* update gpu_timer for rotating buffer as hipblasLt's implementation

* timing fix

* Updating gpu timer for old ck as well

* Revert "Updating gpu timer for old ck as well"

This reverts commit 958cd1bc99.

* code clean up with runtime argument; function rename

* code cleanup

* general timer fixes

* bug fix

* clang formatted

* addressing reveiew comments

* clang formatted

* Addressing review comments

* CI fix

---------

Co-authored-by: Po Yen Chen <PoYen.Chen@amd.com>
2025-07-29 15:21:05 -07:00
Illia Silin
b80099cc5f Revert "Add gemm universal f8 f8 bf16 mk nk instances on gfx950 (#2558)" (#2584)
This reverts commit c64a0c65b9.
2025-07-29 13:04:51 -07:00
Thomas Ning
9d4b494f07 Expand the bandwidth of direct_global_to_lds for gfx950 (#2576)
* Expand the bandwidth of direct_global_to_lds for gfx950

* clang-format

* fix the remod.py and script for clang format

---------

Co-authored-by: Max Podkorytov <4273004+tenpercent@users.noreply.github.com>
2025-07-28 23:56:53 -07:00
rocking
01642ca8b1 set default optdim (#2580) 2025-07-29 13:44:10 +08:00
Illia Silin
49723e94bb fix the clang-format (#2578) 2025-07-28 20:49:55 -07:00
Yi DING
1926cd0cb8 [CK_TILE] FMHA bwd Support hdim as a Multiple of 32 (#2130)
* Fix shuffle_tile

* Add fmha bwd d160

* CHANGELOG

* Use static_cast

* Update

---------

Co-authored-by: asleepzzz <hanwen.chang@amd.com>
2025-07-29 09:31:14 +08:00
Andres Lugo
7fe50dc3da Remove filter for only batch on receipt 4 (#2574)
Re-enable group mode instances for the Pytorch receipt and resolve linker errors for torch SDPA
2025-07-28 14:53:24 -07:00
Bartłomiej Kocot
5b244105d9 Enable multiple D for grouped conv fwd large tensors (#2572) 2025-07-28 22:39:07 +02:00
linqunAMD
0782ee8eb3 Remove !defined(__HIP_DEVICE_COMPILE__) in CK kernel (#2564)
* Remove HIP_COMPILE_DEVICE

* add missing files

* fix clang format

---------

Co-authored-by: Lin, Qun <Quentin.Lin+amdeng@amd.com>
2025-07-28 13:01:07 -07:00
Illia Silin
504b101da3 upgrade from clang-format-12 to clang-format-18 (#2568)
* upgrade to clang-format-18

* update to clang-format-18 in pre-commit-config
2025-07-28 11:34:07 -07:00
Illia Silin
9786087010 use ninja to build packages (#2575) 2025-07-28 11:04:12 -07:00
jefyang1
c64a0c65b9 Add gemm universal f8 f8 bf16 mk nk instances on gfx950 (#2558) 2025-07-28 09:03:54 -07:00
rocking
b36e0b029f [CK_TILE][FMHA] Uncomment all the headdim, use optdim to control (#2539)
* uncomment all the headdim, use optdim to control

* change default back to -1

* uncomment splitkv instance

* Fix typo in receipt 4 for appendkv

* support optdim for bwd, splitkv and appendkv

* Fix 192 key error

---------

Co-authored-by: Max Podkorytov <4273004+tenpercent@users.noreply.github.com>
Co-authored-by: Andy Lugo <Andy.LugoReyes@amd.com>
2025-07-28 17:16:32 +08:00