Skip to content

use gemm template in the water analysis test#833

Open
ftynse wants to merge 2 commits intousers/ftynse/infer-exprs-wave-constraintsfrom
users/ftynse/use-gemm-template
Open

use gemm template in the water analysis test#833
ftynse wants to merge 2 commits intousers/ftynse/infer-exprs-wave-constraintsfrom
users/ftynse/use-gemm-template

Conversation

@ftynse
Copy link
Contributor

@ftynse ftynse commented Feb 5, 2026

We previously couldn't use it due to missing support for wave constraints and it using (unsafe) unceiled division in them. Both are now available with safe workarounds.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the water analysis test to use the generic GEMM template instead of a local duplicate implementation. Previously, the test maintained its own GEMM kernel definition because the template lacked support for wave constraints and used unsafe unceiled division. With recent improvements addressing both issues, the local implementation can now be removed in favor of the shared template.

Changes:

  • Removed local _get_gemm_kernel() function and replaced it with imported get_gemm_kernel() from the GEMM template
  • Updated hyperparameter handling to filter only needed symbols and conditionally override shared memory settings
  • Cleaned up unused imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 34 to 46
hyperparams = {
s: v
for s, v in hyperparams.items()
if s
in [
tkl.sym.M,
tkl.sym.N,
tkl.sym.K,
tkl.sym.BLOCK_M,
tkl.sym.BLOCK_N,
tkl.sym.BLOCK_K,
tkl.sym.ADDRESS_SPACE,
]
}
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

Consider extracting the list of required symbols to a constant or variable before the loop to improve readability and avoid recreating the list on each test iteration. This would make the filtering logic clearer and more maintainable.

Copilot uses AI. Check for mistakes.
@ftynse ftynse force-pushed the users/ftynse/infer-exprs-wave-constraints branch from 97085d5 to e707305 Compare February 6, 2026 09:39
We previously couldn't use it due to missing support for wave constraints and
it using (unsafe) unceiled division in them. Both are now available with safe
workarounds.

Signed-off-by: Alex Zinenko <git@ozinenko.com>
Signed-off-by: Alex Zinenko <git@ozinenko.com>
@ftynse ftynse force-pushed the users/ftynse/use-gemm-template branch from 5fab8ea to 6f4ccc3 Compare February 6, 2026 09:41
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.

2 participants