Skip to content
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

Fixing several bugs in Halide's AMX support #8350

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

yihozhang
Copy link

@yihozhang yihozhang commented Jul 22, 2024

This PR exposes and fixes a number of issues with Halide's current AMX support:

  • Ensures that the modulo in RHS matrix is correct (tiled_matmul_wrong_modulo.cpp)
  • Removes the stride in the 1D case, since there will be just one row and the stride does not really matter.
  • Checks that the RHS tile to be loaded is contiguous in its rows (tiled_matmul_wrong_layout.cpp)
  • Ensures that the tiling of RHS is 4 / element_width (tiled_matmul_wrong_tiling.cpp, tiled_matmul_wrong_pattern.cpp)
  • Swaps tile_x and tile_y in the 3D case
    • this was not found in the first place since tile_x=tile_y always holds in the original tests

Not yet addressed

  • The second child to the Add node in the matcher is ignored.
  • support cases where tile_x = 1 ortile_y=1
  • Load's predicate is not checked
  • Make clear that the optional Broadcast pattern should only occur for the 1D and 2D case

@yihozhang yihozhang changed the title Bugs in Halide's AMX support Fixing several bugs in Halide's AMX support Aug 13, 2024
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