[all-commits] [llvm/llvm-project] b7360f: [mlir][amdgpu] Shared memory access optimization p...
erman-gurses via All-commits
all-commits at lists.llvm.org
Fri Jan 19 15:44:57 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b7360fbe8ca0c9411e89fafd654856c484f84f5e
https://github.com/llvm/llvm-project/commit/b7360fbe8ca0c9411e89fafd654856c484f84f5e
Author: erman-gurses <99776114+erman-gurses at users.noreply.github.com>
Date: 2024-01-19 (Fri, 19 Jan 2024)
Changed paths:
M mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td
M mlir/include/mlir/Dialect/AMDGPU/Transforms/Passes.h
M mlir/include/mlir/Dialect/AMDGPU/Transforms/Passes.td
A mlir/include/mlir/Dialect/AMDGPU/Transforms/Transforms.h
A mlir/include/mlir/Dialect/AMDGPU/Transforms/Utils.h
M mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
M mlir/lib/Dialect/AMDGPU/Transforms/CMakeLists.txt
A mlir/lib/Dialect/AMDGPU/Transforms/OptimizeSharedMemory.cpp
A mlir/lib/Dialect/AMDGPU/Transforms/Utils.cpp
A mlir/test/Dialect/AMDGPU/optimize_shmem_reads_writes.mlir
Log Message:
-----------
[mlir][amdgpu] Shared memory access optimization pass (#75627)
It implements transformation to optimize accesses to shared memory.
Reference: https://reviews.llvm.org/D127457
_This change adds a transformation and pass to the NvGPU dialect that
attempts to optimize reads/writes from a memref representing GPU shared
memory in order to avoid bank conflicts. Given a value representing a
shared memory memref, it traverses all reads/writes within the parent op
and, subject to suitable conditions, rewrites all last dimension index
values such that element locations in the final (col) dimension are
given by newColIdx = col % vecSize + perm[row](col / vecSize, row)
where perm is a permutation function indexed by row and vecSize
is the vector access size in elements (currently assumes 128bit
vectorized accesses, but this can be made a parameter). This specific
transformation can help optimize typical distributed & vectorized
accesses
common to loading matrix multiplication operands to/from shared memory._
More information about the All-commits
mailing list