[PATCH] D154955: [mlir][ArmSME] Implement tile allocation
Cullen Rhodes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 05:49:05 PDT 2023
c-rhodes created this revision.
c-rhodes added reviewers: awarzynski, WanderAway.
c-rhodes added a project: MLIR.
Herald added subscribers: bviyer, Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, kristof.beyls.
Herald added a project: All.
c-rhodes requested review of this revision.
Herald added a reviewer: nicolasvasilache.
Herald added subscribers: stephenneuendorffer, nicolasvasilache.
This patch adds a pass '-allocate-sme-tiles' to the ArmSME dialect that
implements allocation of SME ZA tiles.
It does this at the 'func.func' op level by replacing
'arm_sme.get_tile_id' ops with 'arith.constant' ops that represent the
tile number. The tiles in use in a given function are tracked by an
integer function attribute 'tilesInUse' that is a 16-bit tile mask with
a bit for each 128-bit element tile (ZA0.Q-ZA15.Q), the smallest ZA tile
granule. 'tilesInUse' is initialized on the first 'arm_sme.get_tile_id'
rewrite and updated on each subsequent rewrite. Mixing of different
element tile types is supported.
Section B2 <https://reviews.llvm.org/B2>.3.2 of the SME spec [1] describes how the 128-bit element
tiles overlap with other element tiles.
Depends on D154941 <https://reviews.llvm.org/D154941>
[1] https://developer.arm.com/documentation/ddi0616/aa
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D154955
Files:
mlir/include/mlir/Dialect/ArmSME/Transforms/Passes.h
mlir/include/mlir/Dialect/ArmSME/Transforms/Passes.td
mlir/lib/Dialect/ArmSME/Transforms/CMakeLists.txt
mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp
mlir/test/Dialect/ArmSME/tile-allocation.mlir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154955.539040.patch
Type: text/x-patch
Size: 21045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230711/9e296bc0/attachment.bin>
More information about the llvm-commits
mailing list