Skip to content

[XeTileToXeGPU] add slm support for the lowering of load_tile/store_tile#1015

Merged
chencha3 merged 4 commits intomainfrom
xetile_slm_support_for_upstream
Jan 30, 2025
Merged

[XeTileToXeGPU] add slm support for the lowering of load_tile/store_tile#1015
chencha3 merged 4 commits intomainfrom
xetile_slm_support_for_upstream

Conversation

@chencha3
Copy link
Copy Markdown
Contributor

@chencha3 chencha3 commented Jan 30, 2025

This PR adds lowering support for optimal SLM access. The optimal SLM access is defined as:

tileShape[1] % 16 == 0
slmShape[0] % tileShape[0] == 0
slmShape[1] % tileShape[1] == 0
TileOffset[0] % tileShape[0] == 0
TileOffset[1] % tileShape[1] == 0

regular tile (tile without order attribute)
tileShape[0] x tileShape[1] % 64 == 0 (in bytes) to work
tileShape[0] x tileShape[1] % 256 == 0 (in bytes) for best performance

transposed tile (tile with order attribute)
tileShape[0] % vnni == 0 to work
tileShape[0] % (8 * vnni) == 0 for best performance.

The shape of all uses (init_tile) of the SLM meet the above conditions at the same time.

store/load_tile on regular SLM tile is lowered into 1D xegpu block store_nd/load_nd.
store_tile on transposed SLM tile is lowered into xegpu store_scatter
load_tile on transposed SLM tile is not supported yet, since we don't have a case requiring it.
update_tile_offset on SLM tileType is not also supported, since we don't have a case requiring it.

It also updated the fallback to skip the optimal SLM access and fixed an issue in WgToSg.

Please review these guidelines to help with the review process:

  • Have you provided a meaningful PR description?
  • Have you added a test, a reproducer, or a reference to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?
  • Have you organized your commits logically and ensured each can be built by itself?

@chencha3 chencha3 merged commit ebe5ef8 into main Jan 30, 2025
2 checks passed
@chencha3 chencha3 deleted the xetile_slm_support_for_upstream branch January 30, 2025 23:29
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