Commit Graph

1531 Commits

Author SHA1 Message Date
Po Yen Chen
59005fc1de Add QianFeng to code owners (#1682)
[ROCm/composable_kernel commit: 6916d8cc03]
2024-11-21 14:49:13 +08:00
Illia Silin
d42e9795ed 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
d31a1bb7df fix bug (#1680)
[ROCm/composable_kernel commit: 81ec5eff4a]
2024-11-20 07:03:56 -08:00
Illia Silin
f4b13d3ffd 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]
54b0206887 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
ea702b3631 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
929a9183dc 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]
af52a2eb20 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
c01a539b62 re-enable fp8 gemms in ckProfiler (#1667)
[ROCm/composable_kernel commit: b4a7904582]
2024-11-14 16:15:01 -08:00
Illia Silin
0a0f2c1147 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
2b5daba133 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
0765bd5201 [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
41d3c5ab96 fix clang format (#1662)
[ROCm/composable_kernel commit: efd9261545]
2024-11-13 09:20:18 -08:00
Taylor Ding
31e67ccb79 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
d304f85838 [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
2a9a3c062c test rocm6.3 rc1 build 20 (#1659)
[ROCm/composable_kernel commit: 489c78d073]
2024-11-12 09:35:33 -08:00
Thomas Ning
04c3062b89 [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
40e53c828f restore collecting performance of mixed prec gemms (#1648)
[ROCm/composable_kernel commit: 5fb150dbe7]
2024-11-11 09:25:08 -08:00
valarLip
bc55a7d920 [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
c6de3e22d0 Return nullptr when block index is invalid (#1649)
[ROCm/composable_kernel commit: 13332998a4]
2024-11-11 09:28:32 +08:00
dummycoderfe
77f0f4ee48 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
ae9d04ac98 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
783dc82064 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
7ba8518112 [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
123aae9e6e enable compilation for generic navi targets (#1645)
[ROCm/composable_kernel commit: 75c5bfa364]
2024-11-07 14:14:42 -08:00
rocking
5f89baa4c3 Fix F16 type (#1583)
[ROCm/composable_kernel commit: 3599418aa8]
2024-11-06 11:32:44 -08:00
aledudek
4f8f789834 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
15bd0d9189 Prevent instantiation of undefined FP8 operators. (#1639)
[ROCm/composable_kernel commit: 365f39aed0]
2024-11-05 13:58:29 -08:00
Illia Silin
804c8701e8 remove gfx940;gfx941 from default target lists (#1640)
[ROCm/composable_kernel commit: 54440cf562]
2024-11-05 13:56:20 -08:00
darren-amd
0788008fde 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
18b5aef6fd 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
4bb95f18ed [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
6cc9f5e486 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
357cab6560 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
232d1462a1 [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
0ca6ed9150 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
0658353bab [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
c023906d82 [layernorm] hot fix (#1620)
* hot fix ln

* some rename

[ROCm/composable_kernel commit: 550248deec]
2024-11-01 11:52:50 +08:00
carlushuang
38d6f8a8e2 [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
95011dbba4 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
4f4740dde9 clang-format (#1612)
[ROCm/composable_kernel commit: 7d9111545f]
2024-10-30 08:13:30 -07:00
Adam Osewski
dd429be0d0 [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
92b701bb16 [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
606fb4df2c [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
c67379f54b [CK_TILE] add scatter_gather (#1609)
[ROCm/composable_kernel commit: 4d7e063a0a]
2024-10-29 18:19:29 +08:00
valarLip
a712223d4d [CK_TILE] add generic_permute (#1607)
[ROCm/composable_kernel commit: 9fbd72e97e]
2024-10-29 18:05:53 +08:00
Illia Silin
968f0ffd6b fix compilation errors for gfx12 with clang20 (#1606)
[ROCm/composable_kernel commit: 922e42a039]
2024-10-28 19:02:48 -07:00
carlushuang
ea3af1dfbc topk_softmax (#1592)
* topk_softmax

* remove some file

* fix atomix linear_offset

* address various comment, and change sfc get_index api to static(tuple)

[ROCm/composable_kernel commit: b098b71b05]
2024-10-26 23:52:49 +08:00
Bartłomiej Kocot
1ade932aed Add dynamic elementwise op (#1426)
* Add dynamic elementwise op

Co-authored-by: ThruptiRajLakshmanaGowda <thruptiraj.lakshmanagowda@amd.com>

* CI issues fix

* Custom parameter value for dynamic functions - Comments addressed

---------

Co-authored-by: ThruptiRajLakshmanaGowda <thruptiraj.lakshmanagowda@amd.com>
Co-authored-by: ThruptiRajLakshmanaGowda <tlakshma@amd.com>

[ROCm/composable_kernel commit: 31bf253aeb]
2024-10-26 15:22:37 +02:00
Po Yen Chen
919046f86c [CK_TILE] More fmha splitkv optimizations (#1588)
* Use pre-defined constants for readability

* Use vector write for o_acc tensor

* Remove no-longer used policy method

* Deprecate no-longer used policy/pipeline

* Specify gemm0/gemm1 block warps separately in codegen

* Fix wrong ps_idx creation logic

* Add single-warp block gemm

* Supoprt single-warp gemm0

* Make MakeCBlockTile() as static method

* Use MakeCBlockTile() to get underlying tile distribution

* Use kNumGemm1Warps to compute # threads for gemm1

* Put normal case in the if clause

* Refine fmha splitkv block mapping

* Refine & fix the lse_acc/o_acc layout

* Fix wrong LDS size for K tile

* Use kK0=64 for hdim=128,256 fmha splitkv kernels

* Use kK1=64 for hdim=32,64,128 fmha splitkv kernels

* Undo kK0/kK1 changes

* Use more reasonable GetAlignmentV() computation

* Using store_tile() in fmha splitkv kernel epilogue

[ROCm/composable_kernel commit: 54f0e6f4bb]
2024-10-26 18:35:45 +08:00