12 Commits

Author SHA1 Message Date
Jianhui Li
9dc4ebfff1
[MLIR][XeGPU] Allow create mem desc from 2d memref (#167767)
This PR relax the create_mem_desc's restriction on source memref,
allowing it to be a 2d memref.
2025-11-18 21:31:17 -08:00
Sang Ik Lee
87e094da0f
[MLIR][Conversion] XeGPU to XeVM: Add handler for 1D block ops (#165894)
Add lowering for xegpu load_nd / store_nd with 1D tensor descriptor.
Add conversion test case.
2025-11-10 09:02:32 -08:00
Artem Kroviakov
68c4c83bcb
[MLIR][XeGPU] Matrix load/store subgroup distribution (#165008) 2025-11-03 21:48:27 +01:00
Sang Ik Lee
b258f5c252
[MLIR][Conversion] XeGPU to XeVM: Lower ranked dynamic base memory for create_nd_tdesc. (#164283)
Current lowering pattern for create_nd_tdesc restricts source memref to
static shape.
In case of a dynamic ranked memref, create_nd_tdesc already provides
shape as an argument.
Lowering can use those values instead of returning a mismatch error.
2025-10-29 09:55:50 -07:00
Jianhui Li
77cb19d7aa
[MLIR][XeGPU] XeVM lowering support for load_matrix/store_matrix + fix sanitizer issue (#163858)
This PR fix the sanitizer issue reported post-merge for
https://github.com/llvm/llvm-project/pull/162780
2025-10-16 14:09:48 -07:00
Vitaly Buka
d43581aaee
Revert "[MLIR][XeGPU] XeVM lowering support for load_matrix/store_matrix" (#163684)
Reverts llvm/llvm-project#162780

Breaks build bots, see #162780.
2025-10-16 03:11:42 +00:00
Jianhui Li
6cae29fb3a
[MLIR][XeGPU] XeVM lowering support for load_matrix/store_matrix (#162780)
This PR adds lowering of xegpu.load_matrix/store_matrix to
xevm.blockload/blockstore or and llvm.load/store, depending on wi level
attributes.
It includes a few components: 
   1. adds wi-level attributes: subgroup_block_io.   
2. expand load_matrix/store_matrix op definition to support scalar data
(besides vector data).
2. adds a member function to mem_desc to compute the linearized address
for a nd offsets.
   3. add lowering depending on wi-level attributes: 
a) if subgroup_block_io attribute presents, lower to
xevm.blockload/blockstore
c) else lower to llvm.load/store. If result is a vector, lower to
llvm.load/store with vector operand.
2025-10-15 16:50:41 -07:00
Sang Ik Lee
d60d0381b4
[MLIR][Conversion] XeGPU to XeVM: Remove unused type converter source materializations. (#162947)
And add source materialization for single element vector.
2025-10-15 10:11:56 -07:00
Jakub Kuderski
0820266651
[mlir] Use llvm accumulate wrappers. NFCI. (#162957)
Use wrappers around `std::accumulate` to make the code more concise and
less bug-prone: https://github.com/llvm/llvm-project/pull/162129.

With `std::accumulate`, it's the initial value that determines the
accumulator type. `llvm::sum_of` and `llvm::product_of` pick the right
accumulator type based on the range element type.

Found some funny bugs like a local accumulate helper that calculated a
sum with initial value of 1 -- we didn't hit the bug because the code
was actually dead...
2025-10-11 11:33:18 -04:00
Sang Ik Lee
1b9b79071d
[MLIR][Conversion] Convert XeGPU to XeVM pass: Remove lowering support for tensor descriptor with offsets. (#157550)
And update load/store/prefetch test cases to use direct offsets.
Tensor descriptors with offsets are getting deprecated.
2025-09-10 15:43:03 -07:00
Sang Ik Lee
d943efbb02
[MLIR] Fix issues with XeGPU to XeVM pass. (#155946)
Fixes two issue with XeGPU to XeVM pass

1. xegpu.update_nd_offset op lower generated incorrect code sequence
2. xegpu.store_nd did not lower single element vector
2025-08-28 16:52:18 -07:00
Sang Ik Lee
6166fdacd1
[MLIR][Conversion][XeGPU][XeVM] Add XeGPUToXeVM conversion pass and tests. (#154556)
Add XeGPU to XeVM conversion pass and tests.
2025-08-27 16:14:18 -07:00