[all-commits] [llvm/llvm-project] c511c9: [mlir][ArmNeon] Updates LowerContractionToSMMLAPat...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Wed Apr 3 18:20:05 PDT 2024


  Branch: refs/heads/users/vitalybuka/spr/clangbuiltin-implement-__builtin_allow_runtime_check
  Home:   https://github.com/llvm/llvm-project
  Commit: c511c90680eecae2e4adb87f442f41d465feb0f2
      https://github.com/llvm/llvm-project/commit/c511c90680eecae2e4adb87f442f41d465feb0f2
  Author: Kojo Acquah <KoolJBlack at users.noreply.github.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M mlir/lib/Dialect/ArmNeon/Transforms/LowerContractionToSMMLAPattern.cpp
    M mlir/test/Dialect/ArmNeon/lower-to-arm-neon.mlir

  Log Message:
  -----------
  [mlir][ArmNeon] Updates LowerContractionToSMMLAPattern with vecmat unroll patterns (#86005)

Updates smmla unrolling patterns to handle vecmat contracts where `dimM=1`. This includes explicit vecmats in the form: `<1x8xi8> x <8x8xi8> --> <1x8xi32>` or implied with the leading dim folded: `<8xi8> x <8x8xi8> --> <8xi32>` 

Since the smmla operates on two `<2x8xi8>` input vectors to produce `<2x2xi8>` accumulators, half of each 2x2 accumulator tile is dummy data not pertinent to the computation, resulting in half throughput.


  Commit: 66fed33db014bd705433e4b4f1ea766a8d71cadf
      https://github.com/llvm/llvm-project/commit/66fed33db014bd705433e4b4f1ea766a8d71cadf
  Author: Kojo Acquah <KoolJBlack at users.noreply.github.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/VectorDropLeadUnitDim.cpp
    M mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir

  Log Message:
  -----------
  [mlir][vector] Update `castAwayContractionLeadingOneDim` to omit transposes solely on leading unit dims.  (#85694)

Updates `castAwayContractionLeadingOneDim` to check for leading unit
dimensions before inserting `vector.transpose` ops.

Currently `castAwayContractionLeadingOneDim` removes all leading unit
dims based on the accumulator and transpose any subsequent operands to
match the accumulator indexing. This does not take into account if the
transpose is strictly necessary, for instance when given this
vector-matrix contract:
```mlir
  %result = vector.contract {indexing_maps = [affine_map<(d0, d1, d2, d3) -> (d0, d1, d3)>, affine_map<(d0, d1, d2, d3) -> (d0, d2, d3)>, affine_map<(d0, d1, d2, d3) -> (d1, d2)>], iterator_types = ["parallel", "parallel", "parallel", "reduction"], kind = #vector.kind<add>} %lhs, %rhs, %acc : vector<1x1x8xi32>, vector<1x8x8xi32> into vector<1x8xi32>
```
Passing this through `castAwayContractionLeadingOneDim` pattern produces
the following:
```mlir
    %0 = vector.transpose %arg0, [1, 0, 2] : vector<1x1x8xi32> to vector<1x1x8xi32>
    %1 = vector.extract %0[0] : vector<1x8xi32> from vector<1x1x8xi32>
    %2 = vector.extract %arg2[0] : vector<8xi32> from vector<1x8xi32>
    %3 = vector.contract {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d1)>], iterator_types = ["parallel", "parallel", "reduction"], kind = #vector.kind<add>} %1, %arg1, %2 : vector<1x8xi32>, vector<1x8x8xi32> into vector<8xi32>
    %4 = vector.broadcast %3 : vector<8xi32> to vector<1x8xi32>
```
The `vector.transpose` introduced does not affect the underlying data
layout (effectively a no op), but it cannot be folded automatically.
This change avoids inserting transposes when only leading unit
dimensions are involved.

Fixes #85691


  Commit: 5e3da75c80db749b3000c4a9e930da4784bcfc6f
      https://github.com/llvm/llvm-project/commit/5e3da75c80db749b3000c4a9e930da4784bcfc6f
  Author: Dan Liew <delcypher at gmail.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M clang/lib/AST/TypePrinter.cpp

  Log Message:
  -----------
  [Bounds-Safety][NFC] Clean up leading space emission for CountAttributedType (#87582)

Previously the leading space was added in each string constant. This
patch moves the leading space out of the string constants and is instead
explicitly added to add clarity to the code.


  Commit: 20433e9b2483d64843310e97062541dd73f54436
      https://github.com/llvm/llvm-project/commit/20433e9b2483d64843310e97062541dd73f54436
  Author: Chelsea Cassanova <chelsea_cassanova at apple.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/make/Makefile.rules
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolLocator/CMakeLists.txt
    M lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
    R lldb/test/API/debuginfod/Normal/Makefile
    R lldb/test/API/debuginfod/Normal/TestDebuginfod.py
    R lldb/test/API/debuginfod/Normal/main.c
    R lldb/test/API/debuginfod/SplitDWARF/Makefile
    R lldb/test/API/debuginfod/SplitDWARF/TestDebuginfodDWP.py
    R lldb/test/API/debuginfod/SplitDWARF/main.c

  Log Message:
  -----------
  Revert "DebugInfoD issues, take 2" (#87583)

Reverts llvm/llvm-project#86812. 

This commit caused a regression on the x86_64 MacOS buildbot:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/784/


  Commit: 750843875254b1d493f4d7c3d3921c1bced55b7c
      https://github.com/llvm/llvm-project/commit/750843875254b1d493f4d7c3d3921c1bced55b7c
  Author: Yeoul Na <yeoul_na at apple.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Sema/SemaExpr.cpp

  Log Message:
  -----------
  [BoundsSafety] Minor fixes on counted_by (#87559)

DeclRef to field must be marked as LValue to be consistent with how the
field decl will be evaluated.

T->desugar() is unnecessary to call ->isArrayType().


  Commit: 622851a9059694487811a7f6078312fc2cce5486
      https://github.com/llvm/llvm-project/commit/622851a9059694487811a7f6078312fc2cce5486
  Author: Jason Molenda <jmolenda at apple.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp

  Log Message:
  -----------
  [lldb] Set static Module's load addresses via ObjectFile (#87439)

This is a followup to
https://github.com/llvm/llvm-project/pull/86359
"[lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware memory
(#86359)"

where I treat LLVM_COV segments in a Mach-O binary as non-loadable.
There is another codepath in
`DynamicLoaderStatic::LoadAllImagesAtFileAddresses` which is called to
set the load addresses for a Module to the file addresses. It has no
logic to detect a segment that is not loaded in virtual memory
(ObjectFileMachO::SectionIsLoadable), so it would set the load address
for this LLVM_COV segment to the file address and shadow actual code,
breaking lldb behavior.

This method currently sets the load address for any section that doesn't
have a load address set already. This presumes that a Module was added
to the Target, some mechanism set the correct load address for SOME
segments, and then this method is going to set the other segments to a
no-slide value, assuming they were forgotten.

ObjectFile base class doesn't, today, vend a SectionIsLoadable method,
but we do have ObjectFile::SetLoadAddress and at a higher level,
Module::SetLoadAddress, when we're setting the same slide to all
segments.

That's the behavior we want in this method. If any section has a load
address, we don't touch this Module. Otherwise we set all sections to
have a load address that is the same as the file address.

I also audited the other parts of lldb that are calling
SectionList::SectionLoadAddress and looked if they should be more
correctly using Module::SetLoadAddress for the entire binary. But in
most cases, we have the potential for different slides for different
sections so this section-by-section approach must be taken.

rdar://125800290


  Commit: ef5a7109116c1615a9c99c8dba6577853beb6c73
      https://github.com/llvm/llvm-project/commit/ef5a7109116c1615a9c99c8dba6577853beb6c73
  Author: Han-Chung Wang <hanhan0912 at gmail.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp
    M mlir/test/Dialect/Vector/linearize.mlir

  Log Message:
  -----------
  [mlir][vector] Skip 0D vectors in vector linearization. (#87577)


  Commit: 7e2a1d6f23cb604203324b47237f8e463704a497
      https://github.com/llvm/llvm-project/commit/7e2a1d6f23cb604203324b47237f8e463704a497
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp

  Log Message:
  -----------
  [RISCV] Remove G_TRUNC/ZEXT/SEXT/ANYEXT from the first switch in RISCVRegisterBankInfo::getInstrMapping.

This removes the special case for vectors. The default case in the
second switch can handle GPR in addition to vectors. We just won't
use the static ValueMapping entry.


  Commit: 97523e5321be2542e8e117443ddea10b3f572ae7
      https://github.com/llvm/llvm-project/commit/97523e5321be2542e8e117443ddea10b3f572ae7
  Author: Shih-Po Hung <shihpo.hung at sifive.com>
  Date:   2024-04-04 (Thu, 04 Apr 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/stepvector.ll

  Log Message:
  -----------
  [RISCV][TTI] Scale the cost of intrinsic stepvector with LMUL (#87301)

Use the return type to measure the LMUL size for latency/throughput cost


  Commit: abd05eb4a53e6c7760496620da417733f52d4bf9
      https://github.com/llvm/llvm-project/commit/abd05eb4a53e6c7760496620da417733f52d4bf9
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M clang/include/clang/Frontend/FrontendOptions.h

  Log Message:
  -----------
  [clang] Init fields added by #87357


  Commit: 1f01c580444ea2daef67f95ffc5fde2de5a37cec
      https://github.com/llvm/llvm-project/commit/1f01c580444ea2daef67f95ffc5fde2de5a37cec
  Author: darkbuck <michael.hliao at gmail.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    A llvm/test/CodeGen/AArch64/GlobalISel/combine-commute-int-const-lhs.mir

  Log Message:
  -----------
  [GlobalISel] Fix the infinite loop issue in `commute_int_constant_to_rhs`

- When both operands are constant, the matcher runs into an infinite
  loop as the commutation should be applied only when LHS is a constant
  and RHS is not.

Reviewers: arsenm

Reviewed By: arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/87426


  Commit: 6843b634ba2074a9dbe0b76a45689cec4d84c9be
      https://github.com/llvm/llvm-project/commit/6843b634ba2074a9dbe0b76a45689cec4d84c9be
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M clang/include/clang/Frontend/FrontendOptions.h
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M lldb/packages/Python/lldbsuite/test/make/Makefile.rules
    M lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolLocator/CMakeLists.txt
    M lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
    R lldb/test/API/debuginfod/Normal/Makefile
    R lldb/test/API/debuginfod/Normal/TestDebuginfod.py
    R lldb/test/API/debuginfod/Normal/main.c
    R lldb/test/API/debuginfod/SplitDWARF/Makefile
    R lldb/test/API/debuginfod/SplitDWARF/TestDebuginfodDWP.py
    R lldb/test/API/debuginfod/SplitDWARF/main.c
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/stepvector.ll
    A llvm/test/CodeGen/AArch64/GlobalISel/combine-commute-int-const-lhs.mir
    M mlir/lib/Dialect/ArmNeon/Transforms/LowerContractionToSMMLAPattern.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorDropLeadUnitDim.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp
    M mlir/test/Dialect/ArmNeon/lower-to-arm-neon.mlir
    M mlir/test/Dialect/Vector/linearize.mlir
    M mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir

  Log Message:
  -----------
  [𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.4

[skip ci]


  Commit: 92efd4200689aee1e381dad1da2febf6f4a0822b
      https://github.com/llvm/llvm-project/commit/92efd4200689aee1e381dad1da2febf6f4a0822b
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M clang/include/clang/Frontend/FrontendOptions.h
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M lldb/packages/Python/lldbsuite/test/make/Makefile.rules
    M lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolLocator/CMakeLists.txt
    M lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
    R lldb/test/API/debuginfod/Normal/Makefile
    R lldb/test/API/debuginfod/Normal/TestDebuginfod.py
    R lldb/test/API/debuginfod/Normal/main.c
    R lldb/test/API/debuginfod/SplitDWARF/Makefile
    R lldb/test/API/debuginfod/SplitDWARF/TestDebuginfodDWP.py
    R lldb/test/API/debuginfod/SplitDWARF/main.c
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/stepvector.ll
    A llvm/test/CodeGen/AArch64/GlobalISel/combine-commute-int-const-lhs.mir
    M mlir/lib/Dialect/ArmNeon/Transforms/LowerContractionToSMMLAPattern.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorDropLeadUnitDim.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp
    M mlir/test/Dialect/ArmNeon/lower-to-arm-neon.mlir
    M mlir/test/Dialect/Vector/linearize.mlir
    M mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir

  Log Message:
  -----------
  rebase

Created using spr 1.3.4


Compare: https://github.com/llvm/llvm-project/compare/5a5de6f3abb2...92efd4200689

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