Commit Graph

1525 Commits

Author SHA1 Message Date
Illia Silin
236cc380f1 fix path of ninjatracing (#1685)
[ROCm/composable_kernel commit: 4c7035ff08]
2024-11-22 08:30:01 -08:00
Harisankar Sadasivan
0d34db594d universal streamk fp8 changes (#1665)
* universal streamk fp8 changes & ckprofiler instances

* revert strides to -1 and verification options

* fp8 exclusion on pre-gfx94 for universal_streamk

* PR review based revisions: permissions reverted,  removed hip err checks


---------

Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>

[ROCm/composable_kernel commit: d6d4c2788b]
2024-11-21 08:21:37 -08:00
Po Yen Chen
ed8630416e [CK_TILE] Add paged-kvcache support in group mode fmha fwd splitkv kernels (#1678)
* Generate group mode paged-attn kernel

* Enable paged-kvcache + group mode support

* Add missing header: fused_moe.hpp

* Add comment to explain kernel arg usage

* Make error message more clear

* Add comment for confusing data member names

* Add more comment for confusing variable names

* Fix typo in option description

[ROCm/composable_kernel commit: fb1ccfa9df]
2024-11-21 14:53:10 +08:00
Po Yen Chen
df950309f9 Add QianFeng to code owners (#1682)
[ROCm/composable_kernel commit: 6916d8cc03]
2024-11-21 14:49:13 +08:00
Illia Silin
a5e58cd17a Optimize docker file. (#1679)
* reduce the docker image size and layers

* clean up docker file

* fix linker error for client example 24

* install CK into the default /opt/rocm/ path

* restore installing CK to alternative path in CI

* add linking for utility lib

[ROCm/composable_kernel commit: d31e8249c1]
2024-11-20 14:01:04 -08:00
Haocong WANG
15ce93a491 fix bug (#1680)
[ROCm/composable_kernel commit: 81ec5eff4a]
2024-11-20 07:03:56 -08:00
Illia Silin
87ed997f4b add more fp32 dl gemm instances (#1675)
* add more fp32 dl gemm instances

* update the dates

[ROCm/composable_kernel commit: da0c21f661]
2024-11-19 10:00:17 -08:00
dependabot[bot]
74aa10c051 Bump rocm-docs-core from 1.8.4 to 1.8.5 in /docs/sphinx (#1674)
Bumps [rocm-docs-core](https://github.com/ROCm/rocm-docs-core) from 1.8.4 to 1.8.5.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.8.5/CHANGELOG.md)
- [Commits](https://github.com/ROCm/rocm-docs-core/compare/v1.8.4...v1.8.5)

---
updated-dependencies:
- dependency-name: rocm-docs-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[ROCm/composable_kernel commit: e4dfe4d892]
2024-11-18 22:00:18 -08:00
Illia Silin
dc227604bc Add bf16 and int8 wmma gemms for Navi3x and Navi4x. (#1671)
* add bf16 gemms for gfx11/gfx12

* reduce the input values in test_gemm

* add int8 wmma gemm instances for gfx11/gfx12

* add example gemm_wmma_int8

* fix bug in gemm_wmma_int8 test

* increase bf16 gemm test tolerance

* update the dates and clean-up commented-out instances

[ROCm/composable_kernel commit: 8aba2724cc]
2024-11-18 14:07:04 -08:00
Bartłomiej Kocot
b89a44ea33 Batched GEMM Multiple D based on Universal GEMM (#1655)
* Batched GEMM Multiple D based on Universal GEMM

Co-authored-by: Jing Zhang <jizhan@fb.com>

* CI fixes

Co-authored-by: Jing Zhang <jizhan@fb.com>

---------

Co-authored-by: Jing Zhang <jizhan@fb.com>

[ROCm/composable_kernel commit: 754adc70e3]
2024-11-18 14:03:45 +01:00
dependabot[bot]
78d3df3a47 Bump rocm-docs-core from 1.8.3 to 1.8.4 in /docs/sphinx (#1670)
Bumps [rocm-docs-core](https://github.com/ROCm/rocm-docs-core) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.8.4/CHANGELOG.md)
- [Commits](https://github.com/ROCm/rocm-docs-core/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: rocm-docs-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[ROCm/composable_kernel commit: efb34741fe]
2024-11-15 18:30:58 -05:00
Illia Silin
6179655750 re-enable fp8 gemms in ckProfiler (#1667)
[ROCm/composable_kernel commit: b4a7904582]
2024-11-14 16:15:01 -08:00
Illia Silin
9da305a0f6 re-enable coerce-illegal-types flag for rocm6.3 (#1668)
[ROCm/composable_kernel commit: 3b6a481e92]
2024-11-14 16:14:50 -08:00
Andriy Roshchenko
f8fc165140 Fix example_convnd_fwd_max_xdl_int8 failures on MI300 (#1666)
* Improve test verbosity.

* BUGFIX: Add missing initialization for reduction buffer

* Change default initialization method

Performance may be affected for fp32 and int8 examples.

* Improve test verbosity

* Cleanup

[ROCm/composable_kernel commit: d805a461aa]
2024-11-14 08:40:50 -08:00
feli
44c37881bd [Ck_tile] hot fix, fix rpcf param setting err (#1657)
Co-authored-by: dummycoderfe <noplydummmycoder@163.com>

[ROCm/composable_kernel commit: c1f8d53ce8]
2024-11-14 14:06:36 +08:00
Illia Silin
d80f50d5e9 fix clang format (#1662)
[ROCm/composable_kernel commit: efd9261545]
2024-11-13 09:20:18 -08:00
Taylor Ding
7c9257128d Move checks for compatibility from Argument() to IsSupportedArgument() (#1653)
[ROCm/composable_kernel commit: 73f02a1083]
2024-11-13 11:20:38 -05:00
Bartłomiej Kocot
d10e451e7e [CK TILE] Update gemm universal pipeline (#1644)
* [CK TILE] Update gemm universal pipeline

* Fixes

* fix

* Rebase

[ROCm/composable_kernel commit: d20735691c]
2024-11-13 11:46:18 +01:00
Illia Silin
6b809fd876 test rocm6.3 rc1 build 20 (#1659)
[ROCm/composable_kernel commit: 489c78d073]
2024-11-12 09:35:33 -08:00
Thomas Ning
6bafdd985c [CK Tile] Improve the Layout, Padding, and Alignment features of CK Tile GEMM (#1651)
* Finished the feature

* Modified the test file

* Test case update

* addresss comment

* Addressed the review comment

* Fixed the CI error

[ROCm/composable_kernel commit: 2b6458ddf2]
2024-11-11 18:08:25 -08:00
Illia Silin
5104a01a8a restore collecting performance of mixed prec gemms (#1648)
[ROCm/composable_kernel commit: 5fb150dbe7]
2024-11-11 09:25:08 -08:00
valarLip
0531381131 [CK_TILE] add more stride for layernorm to support un-continuous Tensor (#1650)
* [CK_TILE] add more stride for layernorm to support un-continuous Tensor

* align CK coding style

* extend strides to layernrom expample

* clang-format...

[ROCm/composable_kernel commit: 8ef8a994e7]
2024-11-11 16:02:28 +08:00
Po Yen Chen
f541d4382f Return nullptr when block index is invalid (#1649)
[ROCm/composable_kernel commit: 13332998a4]
2024-11-11 09:28:32 +08:00
dummycoderfe
eec0fed606 Ck tile/moe sorting (#1624)
* add moe_sorting & check ok

* fix comments & typo

* Run remod.py under include/ck_tile & example/ck_tile directories

* format codes

* fix output ci check bug

* fix moe sorting readme and error commit file

* use magiv div to accelerate compute

* add an loop unroll for moe lds ops

* add extblocksnel to set zeros for moebufs

* [Ck_tile] moe set zero run ok, add size check and fix ref check

* [Ck_tile]fix moe_sorting fuse set_zero remod

* [Ck_tile] change name style, fix zero buffer size err, change folder

* [Ck_tile] moe_sorting: fix name style

* [Ck_tile] moe_sorting, remove useless params in traits

* [Ck_tile] change outputtile cnt * unit_size; change output buf alloc

---------

Co-authored-by: dummycoderfe <noplydummmycoder@163.com>
Co-authored-by: Po Yen, Chen <PoYen.Chen@amd.com>
Co-authored-by: carlushuang <carlus.huang@amd.com>

[ROCm/composable_kernel commit: bec6fbc65f]
2024-11-09 17:57:27 +08:00
Po Yen Chen
c35b7e3d61 Fix 'sh' command compatibility of smoke_test_fwd.sh (#1553)
[ROCm/composable_kernel commit: af9546d9f4]
2024-11-09 09:55:14 +08:00
Bartłomiej Kocot
421819d720 Add generic instances for two stage conv bwd wei (#1643)
* Add generic instances for two stage conv bwd wei

* Update layout prefix

[ROCm/composable_kernel commit: ea3640fdea]
2024-11-08 10:04:33 +01:00
dummycoderfe
561c221342 [Ck tile] layernorm2d fwd optimize (#1637)
* optimze small N case using vec io and using rcp div

* [Ck_tile] layernorm, add param to control fastdiv; change generate codes and test pass

* [Ck_tile] fix blockSize compute in Generic2dBlockShape

* [Ck_tile]fix kfastfdiv template style

* [Ck_tile] layernorm, fix stype in review

---------

Co-authored-by: dummycoderfe <noplydummmycoder@163.com>

[ROCm/composable_kernel commit: 686a58a912]
2024-11-08 12:28:23 +08:00
Illia Silin
ddfcce82ab enable compilation for generic navi targets (#1645)
[ROCm/composable_kernel commit: 75c5bfa364]
2024-11-07 14:14:42 -08:00
rocking
b6086eed7c Fix F16 type (#1583)
[ROCm/composable_kernel commit: 3599418aa8]
2024-11-06 11:32:44 -08:00
aledudek
91228f5e50 Generic threshold calculation after merge fixes (#1618)
* Generic threshold calculation add passing num of accums

* Generic threshold - after merge fixes

* Fix cmakelists

---------

Co-authored-by: Adam Osewski <19374865+aosewski@users.noreply.github.com>

[ROCm/composable_kernel commit: dcafb1de15]
2024-11-06 10:44:58 +01:00
Andriy Roshchenko
bc1f12c32f Prevent instantiation of undefined FP8 operators. (#1639)
[ROCm/composable_kernel commit: 365f39aed0]
2024-11-05 13:58:29 -08:00
Illia Silin
ecbe618edd remove gfx940;gfx941 from default target lists (#1640)
[ROCm/composable_kernel commit: 54440cf562]
2024-11-05 13:56:20 -08:00
darren-amd
bee5289f56 Statically Cast Pointer Offset (#1631)
* explicit cast ptr offset

* formating change

[ROCm/composable_kernel commit: d0e3a70a2e]
2024-11-05 09:59:08 -08:00
Illia Silin
827e5ed06d Make sure cmake can handle the xnack+/xnack- targets. (#1633)
* make sure cmake can handle xnack targets

* dont build xdl instances for gfx906:xnack-

* dont build xdl tests for gfx906:xnack-

[ROCm/composable_kernel commit: b6e74be1aa]
2024-11-05 08:53:10 -08:00
Juan Manuel Martinez Caamaño
6e74da9b87 [generate.py] Override blob list if it already exists (#1635)
Before, generate.py appended the list at the end of the output file.
When running the cmake configuration steps multiple times on the
examples, the blob list (such as fwd_blob_list.txt) would grow at every
configuration.
`library/src/tensor_operation_instance/gpu/mha/CMakeLists.txt` worked around
this issue by removing the output file if it exists.

Now, generate.py overrides the content of the output file.
There is no need for the workaround in the CMakeLists.txt;
and the issue is solved for the example projects too.

[ROCm/composable_kernel commit: 464abd235e]
2024-11-05 10:09:52 +01:00
Lin Sun
40df6ce241 Linsun/convint8 fwd instances (#1626)
Add instances for int8 grouped conv2d fwd
---------

Co-authored-by: root <root@dell300x-pla-t28-03.pla.dcgpu>
Co-authored-by: Bartłomiej Kocot <barkocot@amd.com>

[ROCm/composable_kernel commit: 0c9012fb70]
2024-11-04 16:33:20 -08:00
Bartłomiej Kocot
fadab8013c Temporary disable part of dynamic op conv instances (#1630)
* Temporary disable part of dynamic op conv instances

* fix

[ROCm/composable_kernel commit: 4f1fdbb6e3]
2024-11-04 13:34:17 -08:00
carlushuang
537ff25c21 [CK_TILE] layernorm have more accurate residual (#1623)
* more accurate residual

* modify comment

* Fix literal case in README.md

---------

Co-authored-by: Po Yen Chen <PoYen.Chen@amd.com>

[ROCm/composable_kernel commit: cb6c5d39dc]
2024-11-02 13:30:16 +08:00
Illia Silin
f29c4cebf5 Reduce build time. (#1621)
* disable fp8 gemm_universal on gfx90a and gfx908 by default

* fix cmake syntax

* fix clang format

* add ifdefs in amd_xdlops

* disable fp8 gemm instances on gfx90a by default

* update readme

[ROCm/composable_kernel commit: 03c6448ba3]
2024-11-01 13:52:23 +08:00
rocking
4faf3ab587 [Ck_tile] smoothquant (#1617)
* fix compile error

* fix typo of padding

* Add smoothquant op

* Add smoothquant instance library

* refine type

* add test script

* Re-generate smoothquant.hpp

* Always use 'current year' in copyright

* use Generic2dBlockShape instead

* Add vector = 8 instance back

* Find exe path automatically

* Simplify the api condition

* Remove debugging code

* update year

* Add blank line between function declaration

* explicitly cast return value to dim3

* refine return value

* Fix default warmup and repeat value

* Add comment

* refactor sommthquant cmake

* Add README

* Fix typo

---------

Co-authored-by: Po Yen, Chen <PoYen.Chen@amd.com>

[ROCm/composable_kernel commit: fbd654545a]
2024-11-01 13:51:56 +08:00
carlushuang
04610407b0 [layernorm] hot fix (#1620)
* hot fix ln

* some rename

[ROCm/composable_kernel commit: 550248deec]
2024-11-01 11:52:50 +08:00
carlushuang
776c87ea7e [CK_TILE] layernorm support fused-quant/fused-add (#1604)
* add prenorm/postnorm support, refactor using generate.py

* update README

* update README

* fix format

* update some description and fix format

* update format

* format

* use non-raw for loading

* format and update n4096

* dynamic-quant ready

* update readme

* support fused dynamic-quant

* update fused-quant, with smooth

* update README

* update args

* update some based on comment

[ROCm/composable_kernel commit: c3a4800c5f]
2024-10-31 14:54:53 +08:00
Bartłomiej Kocot
724312aea3 Remove virtual destructors from unary ops (#1610)
* Remove virtual destructors from unary ops

* Fixes

* Fixes

* clang format fixes

[ROCm/composable_kernel commit: 9a8a52130d]
2024-10-30 17:42:50 +01:00
rocking
4157a73c07 clang-format (#1612)
[ROCm/composable_kernel commit: 7d9111545f]
2024-10-30 08:13:30 -07:00
Adam Osewski
c0de51533d [CK-Tile] Universal gemm memory bound pipeline (#1558)
* CK-Tile GEMM with memory bound pipeline.

* Memory bound gemm pipeline.

* Fix not closed namespace.

* Block gemm mem pipeline draft.

* Do not use ck_tile:: within ck_tile namespace.

* Refactoring & Move Layout info to pipeline problem.

* Get hot loop and TailNum information before lunching kernel.

* Fixes in pipeline.

* Add comment to load_tile_raw and change variable naming style.

* Few small changes & formatting.

* Do not use macro.

* Add gtests.

* Use AccDataType for Output of MFMA instruction.

* Formatting.

* Refactor gemm examples.

* Switch over to current block gemm.

* Use currently available pipeline policy.

* Refactoring and review comment.s

* Fixes after merge.

* Add missing include.

* Add load tile overload which accepts output tensor as parameter.

* This give 8% perf boost at the cost of using more registers.

* Rename example.

* Small changes.

* Fix compilation err and lower K.

* Support different layouts for A/B

* Fix vector size for different layouts.

* Rename Alignment into VectorSize

* Unblock tests.

[ROCm/composable_kernel commit: 24d996aae1]
2024-10-30 10:05:15 +01:00
rocking
8d2057326a [Ck tile] support rmsnorm and related fusion (#1605)
* Add reduce2d new api

* Prevent user use cross warp reduction

* Fix bug of std caculation

* Add rmsnorm2d

* Add rmsnorm small example

* Remove static assert to prevent compile fail

* Add script to test performance and correctness

* Add missing cmake change

* refine naming

* refine example of rmsnorm

* Fix bug of rmsnorm

* Refine naming

* Fix cmake

* clang format

* Refine pipeline name

* Add add_rmsnorm2d_rdquant kernel

* Add reduce op

* host verification

* Fix bug of one pass pipeline

* Refine tile size

* Add two pass pipeline

* Rename two pass to three pass

* Fix bug of kSaveX == false

* Add instance library

* Add test script

* Fix bug of x verification

* Add save_x to trait

* Add README

* Move reduce2d into reduce folder

* Fix bug of welford when number of m warp > 1

* remove reduncant comment

* 1. move 06_rmsnorm2d to 10_rmsnorm2d
2. move 07_add_rmsnorm2d_rdquant to 11_add_rmsnorm2d_rdquant

* clang format and add missing header

* Add host validation of add + layernorm2d + rsquant

* Revert "Add host validation of add + layernorm2d + rsquant"

This reverts commit 936cb45797.

* Remove deprecated flag

[ROCm/composable_kernel commit: 3d60953477]
2024-10-30 15:22:56 +08:00
Qianfeng
1fc6f29f35 [CK_TILE] Add fmha fwd headdim96 support (#1608)
* Add ceil_to_qualified_tile_length()

* Rename kK0BlockLength to kQKHeaddim

* Add kSubQKHeaddim concept to support headdim96

* Fix in math.hpp to avoid using __half interfaces

* Add LdsBufferSequence instance for headdim96

* Update in fmha_fwd/fmha_fwd_splitkv codegen to support hd96 testing

* Disable hd96 instance generation in codegen fmha_fwd and fmha_fwd_splitkv to save compiling time

* Reformat one file

* Fix text alignment in fmha_fwd_splitkv.py

---------

Co-authored-by: Po Yen Chen <PoYen.Chen@amd.com>

[ROCm/composable_kernel commit: 8632221814]
2024-10-30 14:03:16 +08:00
valarLip
cb33803f3a [CK_TILE] add scatter_gather (#1609)
[ROCm/composable_kernel commit: 4d7e063a0a]
2024-10-29 18:19:29 +08:00
valarLip
3492423270 [CK_TILE] add generic_permute (#1607)
[ROCm/composable_kernel commit: 9fbd72e97e]
2024-10-29 18:05:53 +08:00
Illia Silin
75b1a7a6fe fix compilation errors for gfx12 with clang20 (#1606)
[ROCm/composable_kernel commit: 922e42a039]
2024-10-28 19:02:48 -07:00