[all-commits] [llvm/llvm-project] 8e6039: [mlir][vector-to-gpu] Lower transposed transfer_wr...
Hung-Kuan Tseng via All-commits
all-commits at lists.llvm.org
Mon Sep 14 07:16:53 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8e6039458ad08d5ed7aaaac08a7db19499a98882
https://github.com/llvm/llvm-project/commit/8e6039458ad08d5ed7aaaac08a7db19499a98882
Author: Hung-Kuan Tseng <tseng.tim096 at gmail.com>
Date: 2026-09-14 (Mon, 14 Sep 2026)
Changed paths:
M mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
M mlir/test/Conversion/VectorToGPU/vector-to-mma-ops.mlir
A mlir/test/Integration/GPU/CUDA/TensorCore/wmma-transposed-store-f16.mlir
Log Message:
-----------
[mlir][vector-to-gpu] Lower transposed transfer_write to a transposed MMA store (#221248)
`convert-vector-to-gpu` lowers a `vector.transfer_read` whose
permutation
map puts the most minor dimension first to a `transpose` MMA load since
18ecdbfe6c74, but still rejects the same shape of
`vector.transfer_write`:
```mlir
// Lowered to gpu.subgroup_mma_load_matrix ... leadDimension 3 transpose
%0 = vector.transfer_read %a[%c0, %c0], %f {in_bounds = [true, true], permutation_map = affine_map<(d0, d1) -> (d1, d0)>} : memref<5x3xf16>, vector<3x5xf16>
// Left alone
vector.transfer_write %1, %b[%c0, %c0] {in_bounds = [true, true], permutation_map = affine_map<(d0, d1) -> (d1, d0)>} : vector<3x5xf16>, memref<5x3xf16>
```
The TODO in `transferWriteSupportsMMAMatrixType` waits for a transpose
attribute on the GPU dialect op. `gpu.subgroup_mma_store_matrix` has had
one since 3d35546cd168, and both the NVVM and the SPIR-V lowerings
honour
it, so this classifies the write the same way as the read and sets the
attribute. `leadDimension` already comes from the position of the map
dimensions, so the stride helper is unchanged.
Tests: the existing `no_convert_write_transpose` becomes a positive
test,
plus the 3-D and 4-D strided cases and a not-last-dim negative case,
mirroring the read side. A tensor core integration test runs a
transposed
`transfer_write` through `convert-vector-to-gpu` and the NVVM pipeline
and
checks the stored matrix; it passes on an RTX 3070 (sm_86).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list