Commit Graph

3845 Commits

Author SHA1 Message Date
Emily Martins
2a765fbbad [CK_TILE] Fix MMA concepts compiler error (#4381)
## Motivation

CK Tile is required to support certain older OSs; on these OSs, cpp 20
is not fully supported. For ROCm 7.2, compiler errors occur on one of
these older OSs. An example of this error is as follows:

```bash
/composable_kernel/include/ck_tile/core/arch/mma/amdgcn_mma.hpp:34:28: error: expected concept name with optional arguments
   34 |     { MmaOp::kAMBlock } -> std::convertible_to<unsigned int>;
      |           
```

The goal of this PR is to resolve these compiler errors.

## Technical Details

The existing guards around the mma concepts only check if the concepts
language feature is supported, as follows:

```cpp
#if defined(__cpp_concepts) && __cpp_concepts >= 201907L
// ...
template <typename CtrlFlags>
concept CtrlFlagsGfx9I = requires(CtrlFlags ctrlFlags) {
    // Flag members for Gfx9 MFMA instructions
    { CtrlFlags::Cbsz } -> std::convertible_to<int>;
    { CtrlFlags::Abid } -> std::convertible_to<int>;
    { CtrlFlags::Blgp } -> std::convertible_to<int>;
};

#endif // defined(__cpp_concepts) && __cpp_concepts >= 201907L
```
That said, in cases where functionality from the `<concepts>` header is
used (e.g., `std::convertible_to`), this guard fails to check whether
the `<concepts>` header is available.

This change adds an additional check to the concepts that make use of
functionality from the `<concepts>` header to ensure the header is
available.

## Test Plan

I tested the changes on the relevant docker for gfx90a, gfx950, and
gfx942 and the compiler issue is not present.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
2026-02-06 16:26:57 -08:00
Aviral Goel
01d37b171d Increase tolerance for FP16 GEMM tests to handle non-deterministic ro… (#4335)
…unding

Three tests were failing intermittently with small errors (0.01-1.5%)
due to non-deterministic FP16 accumulation order from GPU thread
scheduling:
- test_ck_tile_batched_gemm
- test_ck_tile_grouped_gemm_preshuffle
- test_ck_tile_grouped_gemm_multi_d

These tests use kbatch=1 (no split-K), so errors are from
order-dependent rounding, not atomics. Increased tolerances from 1e-3 to
2e-3 (0.2%) to account for FP16 precision limits while still catching
real bugs.


- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
2026-02-06 16:14:28 -08:00
assistant-librarian[bot]
0b4203702c [CK] add inter/intrawave scheduling concept doc (#4300)
## Proposed changes

Adding information about inter/intrawave scheduling

---
🔁 Imported from
[ROCm/composable_kernel#3660](https://github.com/ROCm/composable_kernel/pull/3660)
🧑‍💻 Originally authored by @spolifroni-amd

---------

Co-authored-by: spolifroni-amd <sandra.polifroni@amd.com>
Co-authored-by: assistant-librarian[bot] <assistant-librarian[bot]@users.noreply.github.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>
2026-02-06 16:10:23 -08:00
Enrico Degregori
f18a97a1f2 [CK] Workaround blockscale wp test failure (#4372)
## Motivation

Workaround to fix blockscale wp test failure for pipeline v3

## Technical Details

<!-- Explain the changes along with any relevant GitHub links. -->

## Test Plan

<!-- Explain any relevant testing done to verify this PR. -->

## Test Result

<!-- Briefly summarize test outcomes. -->

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
2026-02-06 16:09:08 -08:00
Illia Silin
b5d4754abf [CK] fix path for build filter (#4375)
## Motivation

Fix the filter that determines whether CI builds are necessary.

## Technical Details

A script checks the files list returned by git diff and checks whether
any code source was modified. If not, if only documentation was changed,
it will allow skipping the builds. We make sure we only look at the
changes in projects/composablekernel/ folder.
2026-02-06 13:17:02 -05:00
Geo Min
757438ef9c [ci] Adding mi350 required group ID (#4378)
After updating mi325 group-id, we are noticing errors for mi350.

Tested here for mi350:
https://github.com/ROCm/TheRock/actions/runs/21733399385/job/62692971370
Tested here for mi325:
https://github.com/ROCm/TheRock/actions/runs/21759203211/job/62778060417

Adding both work properly
2026-02-06 09:59:29 -08:00
Illia Silin
2a054fc767 [CK] a bunch of CI fixes. (#4361)
## Motivation

Fixing some of the CK CI issues

## Technical Details

fixing paths to dockerfiles and scripts;
moving codegen tests to separate stage (collides with main build since
you must call cmake from same folder but different options);
fixing a couple of clang compilation issues with staging compiler;
2026-02-05 20:06:57 -05:00
Eiden Yoshida
f382d48125 [CK] MICI: Fix git diff in selective_test_filter.py (#4352)
## Motivation

- git diff needs access to reference repo

## Technical Details

- mount reference repo path into docker for selective_test_filter.py to
access

## Test Plan

- tested in MICI

## Test Result

- launch_tests.sh ran successfully
2026-02-05 17:56:12 -05:00
Geo Min
684654cf84 [ci] Updating variable group-id for OSSCI (#4360)
OSSCI migrated mi325s, so need a new groupID

Sanity works here:
https://github.com/ROCm/TheRock/actions/runs/21723540679/job/62659665907
normal run works here:
https://github.com/ROCm/TheRock/actions/runs/21723540679/job/62659791422

I've dabbled with organization variables, however, this does not work
for forks so for now, we will do the manual update
2026-02-05 11:01:53 -08:00
Jobbins
9ac0ae7cba [composablekernel] fix failure status (#4351)
## Motivation

Pipelines were failing on Math CI status check.

## Technical Details

For the success case, we just changed the config in Jenkins to use a
proper app token and no code changes were required. However, the failure
case would not have worked as coded, so we needed to move that outside
of the `rocmnode()` block.

## Test Plan

I removed all of the CI in one of the commits to quickly test, and then
added it back.  Got a successful "success" message and "failure" message
produced
2026-02-05 08:56:42 -07:00
Eiden Yoshida
ece63708f2 [CK] MICI: Correct path for build trace script (#4349)
## Motivation

- Corrects path to script due to superrepo migration
- Forces all tests to run by default

## Technical Details

- now in /projects/composablekernel

---------

Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>
2026-02-05 10:55:44 -05:00
Eiden Yoshida
e3f6354c67 [CK] MICI: Use reference repo for checkout operations (#4336)
## Motivation

- Maintain a reference repo on slave nodes that speeds up any
clone/checkout operations

## Technical Details

- clone a ref repo if it does not exist
- update ref repo if it does exist
- checkout after ref repo is updated
- eliminates double clone

## Test Result

- Initial checkouts succeeded
2026-02-04 21:43:22 -05:00
assistant-librarian[bot]
9c0d4114ae [CK] Add FP8 KV_BLOCKSCALE support for batch prefill (#4263)
Implement per-page K/V quantization for paged attention:
  - Add KV_BLOCKSCALE enum to BlockAttentionQuantScaleEnum
  - Use exp2 shift trick to eliminate explicit P scaling overhead
- Prefetch physical pages offset for KV cache, overlaps with
computations

## Proposed changes

Please describe the motivation behind the pull request, whether it
enables a new feature or fixes a bug. If there are associated pull
requests or issues, please link them to the pull request.

## Checklist

Please put an `x` into the boxes that apply. You can also fill these out
after creating the PR. If you're not sure, please don't hesitate to ask.

- [ ] I have added tests relevant to the introduced functionality, and
the unit tests are passing locally
- [ ] I have added the test to REGRESSION_TESTS list defined at the top
of CMakeLists.txt in tests/CMakeLists.txt, **IF** the test takes more
than 30 seconds to run.
- [ ] I have added inline documentation which enables the maintainers
with understanding the motivation
- [ ] I have removed the stale documentation which is no longer relevant
after this pull request
- [ ] (If this change is user-facing) I have added release notes which
provide the end users with a brief summary of the improvement from this
pull request
- [ ] I have run `clang-format` on all changed files
- [ ] Any dependent changes have been merged

## Discussion

If this is a relatively large or complex change, feel free to start a
discussion by explaining why you chose the solution you did and what
alternatives you considered



---
🔁 Imported from
[ROCm/composable_kernel#3696](https://github.com/ROCm/composable_kernel/pull/3696)
🧑‍💻 Originally authored by @Jeff-Huang

---------

Co-authored-by: Jeff Huang <chiachi.huang@amd.com>
Co-authored-by: Illia Silin <Illia.Silin@amd.com>
2026-02-04 18:25:31 -05:00
Illia Silin
170d49eb2c CK CI migration. (#4310)
## Motivation

Enable the CK CI after migration from standalone repo.

## Technical Details

Modify the jenkinsfile in projects/composablekernel to update the CI
workflow.

## Test Plan

This is for CK internal testing only.

## Test Result

Set up new CK CI pipeline/dashboard.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

---------

Co-authored-by: Andrew Clark <andrew.clark@amd.com>
2026-02-04 12:34:38 -05:00
Ameya Keshava Mallya
82a79cc337 Merge remote-tracking branch 'origin/develop' into preserved/composablekernel 2026-02-03 22:50:14 +00:00
assistant-librarian[bot]
db2688820e Merge commit '421b714f139fda3361eb4d83a3a87fd8cc1cf169' into develop 2026-02-03 18:31:31 +00:00
andrew clark
8ecb21e120 Adding Additional Failure Patterns for Alerts (#3663)
* Added two new failure patterns to detect. Including test function to verify if the patterns are detected

* Modifying pattern match to detect docker login failure. Removed passing tests.

* Removing passing tests. Modifying docker pattern to detect failure

* Removed passing tests

* Removing test logging function

[ROCm/composable_kernel commit: 421b714f13]
2026-02-03 10:23:07 -08:00
Illia Silin
aef327296e Revert "Implement device grouped gemm fixed nk multi abd for rdna4 (#3619)" (#3705)
This reverts commit 372a284890dc19cfd3c241c3e9a6076d35e843a5.

[ROCm/composable_kernel commit: 569640dc70]
2026-02-03 09:52:14 -08:00
assistant-librarian[bot]
fc1ff7a1f8 Merge commit '8cbd09c84a3010b4b3dbe2604875772363e2396b' into develop 2026-02-03 16:29:00 +00:00
Emily Martins
4add4af76e [CK_TILE] Stream-K Tile Engine Test Config File Generation (#3662)
* Stream-K smoke test config file generation

This change converts the stream-k smoke tests to use tile engine. Since
the m, n, and k values dependent on the CU count of a device, the
configs are generated during the Configuration Phase.

* Compute GEMM reference on GPU

* Remove redundant Stream-K tests

Removing redundant tests that are now run via tile engine.

* Fix relative and absolute tolerance calculation

This change updates the Stream-K tile engine interface to ensure that
num_wgs_per_tile is propaged and passed into the compare_results
function to calculate the rel and abs tolerance. Before, split-k was
used, which is incorrect for Stream-K since the split-k value is
always 1.

* Cleanup imports, types, and other misc items

This commit makes the following changes:
- Uses Typing module for nested type hints
- Uses quotes around cu_count_arg argument in generate_configs.cmake in
  if statements
- Adds explicit include for tuple in test_gemm_streamk_simple.cpp
- Adds a type for the tiles argument in argparser to check argument
  validity

* Use CU count as return value for better parsing

* Add reduction tests for bf16, fp8, and bf8

[ROCm/composable_kernel commit: 8cbd09c84a]
2026-02-03 09:12:15 -07:00
assistant-librarian[bot]
ef6ce49698 Merge commit '3f04d27b687365332d2f1654f169444cab192927' into develop 2026-02-03 11:22:52 +00:00
Max Podkorytov
0f8c7cad09 Remove concrete performance numbers from BUILD_TIME_OPTIMIZATION.md (#3702)
Replace specific benchmark numbers with qualitative descriptions since
measurements vary across environments and may become outdated.

Co-authored-by: Claude <noreply@anthropic.com>

[ROCm/composable_kernel commit: 3f04d27b68]
2026-02-03 03:54:18 -07:00
assistant-librarian[bot]
f27120c60e Merge commit '8b56ffb6aea4dd5e3c531912ee6b2258398606ee' into develop 2026-02-03 03:12:05 +00:00
Illia Silin
a5a7527d76 Fix one more lifetimebound error. (#3703)
* fix staging compiler errors

* fix clang format

[ROCm/composable_kernel commit: 8b56ffb6ae]
2026-02-02 18:25:56 -08:00
Bartłomiej Kocot
39ea2de1d7 Fix path to ck tile conv fwd instance generator (#3699)
* Fix path to ck tile conv fwd instance generator

* fixes

[ROCm/composable_kernel commit: f2b9b3a3a6]
2026-02-02 18:07:33 -08:00
assistant-librarian[bot]
9c38bf0527 Merge commit '3e777217551c82a47eb9540791fb5542f2704e63' into develop 2026-02-02 23:16:03 +00:00
Aviral Goel
b948026e16 feat: add split_k support for block scale gemm bquant mode. (#3653)
* WIP: add splitk to bquant

* feat: add support for bf8i4 and fp8i4 by calculating correct stride for packed data types

* chore: remove temporary test script

* fix: incorrect tile window length for splitted bq tensor window

* chore: improve comments

* test: add unit tests to cover bquant splitk functionality

* fix: conflict resolution by renaming variables

[ROCm/composable_kernel commit: 3e77721755]
2026-02-02 14:41:53 -08:00
Zoltán Lakatos
839a37780c Implement device grouped gemm fixed nk multi abd for rdna4 (#3619)
* device struct implementation

* added xdl grouped multi abd fixed nk testing

* wmma implementation fixed

* avoid unnecessary device mem allocation and code cleanups

* cleanup instances definitions

* wmma examples added

* code cleanups

* fix clang format

* typo and compilation fixes related to reference gemm

* fix compilation error due to std::remove_cvref_t

* added missing hip_check_error includes

* correction to example instances

* review commentes addressed

* removed split-k from testing

* code formatting

---------

Co-authored-by: Zoltán Lakatos <zoltan.lakatos@streamhpc.com>
Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>

[ROCm/composable_kernel commit: 301eb5cf08]
2026-02-02 13:58:11 -08:00
assistant-librarian[bot]
b0b7f95d6e Merge commit '069500464de6a55b80e8341c79239b13ac8ef379' into develop 2026-02-02 18:23:47 +00:00
Jan Patrick Lehr
470f031e58 [Compiler] Addressing new compiler warnings (#3640)
* [Compiler] Addressing new compiler warnings

Clang enables new lifetime warnings in production and we see build
errors due to this with the staging compiler.

The attributes added in this PR are suggested by the compiler. However,
I'm not very familiar with the code base, so the changes may be
incorrect.

* Update some more instances

* Adds file-level ignores via clang diagnostic pragma

The number of instances was large, so I decided to use file-level scope
to disable the warning via pragma clang diagnostic ignored.

It also showed this warning coming from the gtest dependency. For that,
I did add the respective command line flag to the CMake variables. I
don't know if this is acceptable or not.

* This adds the remaining instances

For a build on gfx90a.

* fix clang format

* Adding couple more instances from gfx1200 build

* Fixed another few instances

---------

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

[ROCm/composable_kernel commit: 069500464d]
2026-02-02 09:39:48 -08:00
assistant-librarian[bot]
6b3e501d83 Merge commit 'e6bcd192d432561642d45ea5b1c759d6f80ace2a' into develop 2026-02-02 08:25:21 +00:00
ZheWang
c006b10452 Mx fp6 flatmm (#3601)
* add fp6 data-type and support sync/async dwordx3 load/store

* clang-format

* pre-commit

* 1st commit

* default mnk pass ut

* fix a distrubution

* fix

* fix bdram distr

* update

* pass ut

* improve perf

* update

* clean code

* resolve copilot comment

* reslove comment

* clang-format

---------

Co-authored-by: ZheWang <zhewan@amd.com>

[ROCm/composable_kernel commit: e6bcd192d4]
2026-02-02 16:04:40 +08:00
assistant-librarian[bot]
2d624e5a9f Merge commit '1ae83137eb444bba1ba8b064eb77c2e486d90d7d' into develop 2026-01-31 23:13:17 +00:00
Bartłomiej Kocot
cb58ffa4b8 Enable Grouped Conv Tile Fwd Tests daily (#3680)
[ROCm/composable_kernel commit: 1ae83137eb]
2026-01-31 15:55:25 -07:00
assistant-librarian[bot]
19d77f522e Merge commit '8c1788757a88ee03bc8dbeb69704832c99fa719c' into develop 2026-01-30 20:16:06 +00:00
Po Yen Chen
59a132c68d [CK_TILE] Fix incompatible vector type arguments for the intrinsic calls (#3672)
* Change call to the intrinsics

* fix clang format

* Undo changes under include/ck/utility

* Use named variable as vector size

---------

Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>

[ROCm/composable_kernel commit: 8c1788757a]
2026-01-30 12:02:49 -08:00
assistant-librarian[bot]
8bcc4bcacf Merge commit '70d71b1514cc650ef7808d8757097f2d8617d313' into develop 2026-01-30 18:22:07 +00:00
ApoorvaKalyani
55f0489b03 Test fix for gemm_b_scale_xdl_v3. (#3674)
[ROCm/composable_kernel commit: 70d71b1514]
2026-01-30 10:34:54 -07:00
assistant-librarian[bot]
1559a473a8 Merge commit '63df1c0af2b559a6129afb5392fc560d99980926' into develop 2026-01-30 17:22:22 +00:00
Illia Silin
ab24c0ffe9 remove builds on legacy OSs from CI (#3693)
[ROCm/composable_kernel commit: 63df1c0af2]
2026-01-30 09:15:09 -08:00
jiangyon.ren
ce51308aaf [CK_TILE][FMHA] Add sparse attention VSA (#3341)
* add sparse attention VSA

* fix the pre-commit

* Add jenga test and pre-commit

* add bf16 for vsa

* add jenga support bf16

* remove lse arg

* split kernel code to block & kernel

* fix the pre-commit

* fix the pre-commit

* fix the copyrights

* fix the copyright

* fix the copyright & rename block to pipeline

* fix the copyright and pipeline

* remove lse & dropout & add fmt

* fix the jenga&VSA code review

* remove the useless code & resolved the comments

* remove useless code

* remove useless code

* Clean up code

* Remove more unused code

* Re-format .hpp

* Refactor codegen scripts

---------

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

[ROCm/composable_kernel commit: 4d2f8c111e]
2026-01-31 00:59:47 +08:00
assistant-librarian[bot]
6d1282b943 Merge commit '2377a628373f2c4dd8b92ae9f853b1fb14c55953' into develop 2026-01-30 16:20:17 +00:00
Kiefer van Teutem
65c2e81817 Adding remaining conv, dynamic_op, and scaleadd_scaleadd_relu flavors for grouped conv fwd (#3529)
* Adding remaining flavors for grouped conv fwd

As titled. Following variants are added:
- grouped_conv2d_fwd_dynamic_op
- grouped_conv3d_fwd_dynamic_op
- grouped_conv3d_fwd_bilinear
- grouped_conv3d_fwd_convscale
- grouped_conv3d_fwd_convinvscale
- grouped_conv3d_fwd_convscale_add
- grouped_conv3d_fwd_convscale_relu
- grouped_conv3d_fwd_scale
- grouped_conv3d_fwd_combconvscale
- grouped_conv3d_fwd_scaleadd_scaleadd_relu

* Fix incomplete parsing of types from source names in add_instance_library() cmakelists function so we don't build f8 on RDNA3.

* Do not build f8 / bf8 only flavor tests on RDNA3

* Make sure we have proper generic instances for all instance lists related to the post-ces extra flavors, with scalarPerVector = 1. Then disable all but one generic instance per instance list to reduce compile time.

* Post rebase fix: Template parameters for Grouped Conv Fwd Device Impl got tweaked upstream.

* adding int8 and fp16 overloads to the elementwise operations

* fixed copilot nits

* Addressing review comments:

- removed unnecessary examples for dynamic op
- removed unnecessary conv specalizations for all the flavors
- removed spurious bilinear and scale source files

* clang-format

* reduced no of tests

---------

Co-authored-by: Wojciech Laskowski <wojciech.laskowski@streamhpc.com>

[ROCm/composable_kernel commit: 2377a62837]
2026-01-30 17:02:14 +01:00
assistant-librarian[bot]
3a18b2f29e Merge commit '6a6177a246d6c81932fbb1061ad6a62e90b788a1' into develop 2026-01-30 12:22:40 +00:00
Erwin Terpstra
09d443a7ad [CK_Tile] Support for a4w4 (fp4) in block scale gemm AB quant (#3603)
* chore: split block scale example instances in more separate files to speed up compile times

* wip: fp4 scaffolding for abquant

* feat: add fp4 decoding-while-loading to abquant pipeline

* feat: add support for fp4 CPU verification in abquant

* chore: add time tracking to reference calculation

* feat: add a4w4 test for blockscale gemm

* feat: optimize reference calculation by preconverting values to AccType

* feat: add fp4 to fp8 look-up table

* fix: reference to wrong ComputeDataType field in QuantProblem

* feat: type utilities for determining MFMA compute types

* feat: packed fp4 for abquant weight preshuffle

* feat: add separate tests for a4w4 base case, padding and preshuffleB

* fix: fp4 conversion on gfx950 attempting to use non-supported method

* fix: test case was using quant group sizes which don't work on gfx950 due to larger mfma tile size

* chore: add fp4 preshuffleb mode to block scale example

* chore: sanity check for packed types being 1 byte

* chore: clarify tensor dimension indices with constants

* chore: replace traits check with specialized check for packed types

* style: some minor refactoring and cleanup

* fix: correct conversion table for FNUZ fp8

* chore: add fp4 instances to main abquant instances again

* chore: use same initialization branch for int4 and fp4

* chore: add missing initialization for fp4 in block scale gemm example

---------

Co-authored-by: Thomas Ning <Thomas.Ning@amd.com>

[ROCm/composable_kernel commit: 6a6177a246]
2026-01-30 04:40:50 -07:00
assistant-librarian[bot]
d4a93660fb Merge commit '565fea26455b8e4f78ac57ed64d6bd12e701a9c9' into develop 2026-01-30 08:21:17 +00:00
Zoltán Lakatos
e7483043e6 fix undefined behaviour in softmax kernel (#3683)
Co-authored-by: root <zoltan.lakatos@streamhpc.com>

[ROCm/composable_kernel commit: 565fea2645]
2026-01-30 15:22:54 +08:00
assistant-librarian[bot]
0cda2801c4 Merge commit 'f3d8b7210fb99827bcb1d1bdaf9672b3ae8fb209' into develop 2026-01-30 04:42:40 +00:00
vivienfanghuagood
e38029e946 Extend CK fmha_batch_prefill kernel coverage to head_dim=256 (#3328)
Co-authored-by: Po Yen Chen <PoYen.Chen@amd.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>

[ROCm/composable_kernel commit: f3d8b7210f]
2026-01-30 11:18:20 +08:00
assistant-librarian[bot]
a59a3944e8 Merge commit '6ff073784321a55ee276f38af195532d8d812670' into develop 2026-01-30 03:12:55 +00:00