Skip to content

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