[all-commits] [llvm/llvm-project] c9e11e: [mlir][gpu] Keep memref.load/store attributes in d...
Hung-Kuan Tseng via All-commits
all-commits at lists.llvm.org
Mon Sep 14 08:08:23 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9e11e5cfa1216f2eebb2f11eaf84cd081790926
https://github.com/llvm/llvm-project/commit/c9e11e5cfa1216f2eebb2f11eaf84cd081790926
Author: Hung-Kuan Tseng <tseng.tim096 at gmail.com>
Date: 2026-09-14 (Mon, 14 Sep 2026)
Changed paths:
M mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp
M mlir/test/Dialect/GPU/decompose-memrefs.mlir
Log Message:
-----------
[mlir][gpu] Keep memref.load/store attributes in decompose-memrefs (#221312)
`gpu-decompose-memrefs` rewrites a `memref.load`/`memref.store` inside a
`gpu.launch` into a `reinterpret_cast` to the linearised offset plus a
0-d access, but rebuilds the op from the new memref only. `nontemporal`,
`alignment` and `invariant` are dropped from the load, `nontemporal` and
`alignment` from the store:
```mlir
%res = memref.load %arg0[%tx, %ty, %tz] alignment(16) nontemporal(true) invariant(true) : memref<?x?x?xf32>
// becomes
%1 = memref.load %reinterpret_cast[] : memref<f32, strided<[], offset: ?>>
```
The rewrite accesses the same element with the same type, so all of
them still hold on the new op. Pass them to the builder; the attribute
form is the one that also carries `invariant`.
Tests: a load and a store case next to the existing `@decompose_load`
and `@decompose_store`.
AI tool use: I worked on this patch together with an AI assistant
(Claude Code).
Every line of the change and the tests was reviewed and verified by me,
and I am
accountable for it.
Assisted-by: Claude Code
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