Skip to content

[BENCHMARK] Reuse CUTLASS's gemm configuration file #4720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 29, 2025

Conversation

jle-quel
Copy link
Contributor

@jle-quel jle-quel commented Jul 15, 2025

Description

This PR introduces a new mechanism for fetching GEMM configurations.

Instead of hardcoding the (shape → config) mapping, the config-tool.py script now parses a configuration file and generates the gemm_config structure dynamically.

The configuration file consists of a list of GEMM kernel invocations with the corresponding GemmConfig. These will be extracted and used to invoke the kernel with the appropriate configuration.

Note

Currently, the configuration file is located in benchmarks/cutlass_kernel/gemm. In the future, this should be updated to fetch the file directly from the CUTLASS repository: https://github.com/intel/cutlass-sycl
This change will be made once the CUTLASS repo includes a unified file containing the optimal configurations for all shapes used in the Triton benchmark.

sommerlukas and others added 2 commits May 23, 2025 16:31
Instead of creating our own mapping from problem shape to CUTLASS GEMM
configuration, re-use existing information in CUTLASS.

This adds a small tool that can parse CUTLASS' benchmark configuration
files and generate a C++ header with the problem shape to configuration
mapping.

The generated header is included in the CUTLASS kernel benchmark to
dispatch to the best known configuration for each problem shape.

Signed-off-by: Lukas Sommer <[email protected]>
…into sommerlukas/reuse-cutlass-gemm-config

Signed-off-by: Jefferson Le Quellec <[email protected]>
@jle-quel jle-quel marked this pull request as draft July 15, 2025 13:51
@jle-quel jle-quel changed the title [BENCHMARK] Reuse CUTLASS gemm config [DRAFT][BENCHMARK] Reuse CUTLASS's gemm configuration file Jul 15, 2025
jle-quel added 2 commits July 23, 2025 18:41
Signed-off-by: Jefferson Le Quellec <[email protected]>
Signed-off-by: Jefferson Le Quellec <[email protected]>
@jle-quel jle-quel marked this pull request as ready for review July 25, 2025 09:52
@jle-quel jle-quel changed the title [DRAFT][BENCHMARK] Reuse CUTLASS's gemm configuration file [BENCHMARK] Reuse CUTLASS's gemm configuration file Jul 25, 2025
@jle-quel jle-quel requested review from anmyachev, a team and whitneywhtsang July 25, 2025 09:52
@anmyachev
Copy link
Contributor

This change will be made once the CUTLASS repo includes a unified file containing the optimal configurations for all shapes used in the Triton benchmark.

Hi @jle-quel. Is there a tracker for this yet? So we can monitor it more easily.

@jle-quel
Copy link
Contributor Author

This change will be made once the CUTLASS repo includes a unified file containing the optimal configurations for all shapes used in the Triton benchmark.

Hi @jle-quel. Is there a tracker for this yet? So we can monitor it more easily.

There is a ticket on our side that is tracking it : #4775

Copy link
Contributor

@whitneywhtsang whitneywhtsang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check no unexpected performance impact on the CUTLASS GEMM before merging.

Started CI: https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/16576519983

@whitneywhtsang
Copy link
Contributor

Potential performance degradation on CUTLASS gemm: Grafana

@sommerlukas
Copy link
Contributor

Potential performance degradation on CUTLASS gemm: Grafana

As neither the previous nor this configuration are delivering the best known performance for GEMM in CUTLASS, I'd suggest to still merge this PR with the basic infrastructure for the config files and add/use the correct configuration in a future PR.

@etiotto etiotto merged commit 82f505a into main Jul 29, 2025
18 checks passed
@etiotto etiotto deleted the sommerlukas/reuse-cutlass-gemm-config branch July 29, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants