[all-commits] [llvm/llvm-project] 9052a8: [mlir][AMDGPU] Infer canonical layouts for fat_raw...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Mon Jul 21 13:18:42 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9052a85da803b246fa6a6f8b3b5bcbfc2e9de7a8
      https://github.com/llvm/llvm-project/commit/9052a85da803b246fa6a6f8b3b5bcbfc2e9de7a8
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2025-07-21 (Mon, 21 Jul 2025)

  Changed paths:
    M mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
    M mlir/test/Conversion/AMDGPUToROCDL/amdgpu-to-rocdl.mlir
    M mlir/test/Dialect/AMDGPU/ops.mlir

  Log Message:
  -----------
  [mlir][AMDGPU] Infer canonical layouts for fat_raw_buffer_cast resetOffset (#149867)

When inferring the return type of amdgpu.fat_raw_buffer_cast with the
offset reset, we would sometimes use a strided layout, like
strided<[1]>, in cases where, after stripping the offset, the memref had
the identity layout. This would cause issues with EmulateNarrowTypes,
which does perform this layout canonicalization.

Now, the return type inference will put in an identity layout after
offset stripping for
1. Statically-shaped memrefs of any rank where the strides match the
suffix product of the shape, and
2. Memrefs of rank <= 1 whose strides are [1] (or []) that just had
their offset removed by resetOffset.



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