Skip to content

Conversation

@mirza-halilcevic
Copy link
Contributor

@mirza-halilcevic mirza-halilcevic commented Dec 11, 2025

Motivation

Implement proper quick tuning support for Attention operations.

Technical Details

  • Remove InitParams, and use Rock attributes directly instead
  • Combine WmmaGemmParams and MfmaGemmParams into AccelGemmParams and implement deserialization
  • Store serialized perfconfigs inside QuickTuningPerfconfigs.inc and update ParamLookupTable accordingly
  • Rename AttnPerfConfigAttr to GemmGemmParams
  • Rename other occurences of Attn to GemmGemm in order to match the Rock interface
  • Introduce GridwiseGemmGemmParams.h/cpp with PopulateParamsGemmGemm implementation
  • Refactor and update quickTuningGen.py

Resolves https://github.com/ROCm/rocMLIR-internal/issues/1887
Resolves https://github.com/ROCm/rocMLIR-internal/issues/1447

Test Plan

Test Result

Submission Checklist

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: own file for attention/g+g?


#ifdef Attn_LOOKUP_TABLE_GEN

{"gfx900_attention_f32", {PopulateParamsAttn::initParametersAttentionGfx900, PopulateParamsAttn::nInitParametersAttentionGfx900}},
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess temporarily, gemm+gemm kernels will use attention quick tuning list but eventually, we'll have a list for gemm_gemm? (and potentially conv+gemm). We already have a tier1-gemmgemm list

Copy link
Contributor Author

Choose a reason for hiding this comment

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

- Retire InitParamsNonAccel and InitParamsAccel
- Combine MfmaGemmParamsAttr and WmmaGemmParamsAttr into
  AccelGemmParamsAttr
@mirza-halilcevic mirza-halilcevic marked this pull request as ready for review December 28, 2025 00:32
tuningParams);
} else if (isWmma) {
WmmaGemmParamsAttr wmmaParams = cast<WmmaGemmParamsAttr>(tuningParams);
AccelGemmParamsAttr wmmaParams = cast<AccelGemmParamsAttr>(tuningParams);
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to cast this? I understand tuningParams is already AccelGemmParamsAttr?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, we don't. This was the result of a find and replace so I missed it. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, tuningParams is RockAccelTuningParamAttrInterface, so we are downcasting.

@mirza-halilcevic mirza-halilcevic merged commit 4409a7b into develop Jan 8, 2026
8 of 15 checks passed
@mirza-halilcevic mirza-halilcevic deleted the attn-quick-tune branch January 8, 2026 09:14
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.

4 participants