22220 Commits

Author SHA1 Message Date
Adrian Kuegel
6e8d7e2e7f [mlir] Apply ClangTidy finding (NFC)
loop variable is copied but only used as const reference; consider making it a const reference
2025-03-10 07:43:40 +00:00
Krzysztof Drewniak
1b2c23acbb
Re-land "[mlir][ODS] Add a generated builder that takes the Properties struct" (#130117) (#130373)
This reverts commit 32f543760c7f44c4c7d18bc00a3a1d8860c42bff.

Investigations showed that the unit test utilities were calling erase(),
causing a use-after-free. Fixed by rearranging checks in the test
2025-03-08 17:33:14 -06:00
Prakhar Dixit
037756242f
[mlir]Add a check to ensure bailing out when reducing to a scalar (#129694)
Fixes issue #64075
Referencing this comment for more detailed view ->
https://github.com/llvm/llvm-project/issues/64075#issuecomment-2694112594

**Minimal example crashing :** 
```
func.func @multi_reduction(%0: vector<4x2xf32>, %acc1: f32) -> f32 {
  %2 = vector.multi_reduction <add>, %0, %acc1 [0, 1] : vector<4x2xf32> to f32
  return %2 : f32
}
```
2025-03-08 16:34:01 +00:00
Uday Bondhugula
b01c71bbd4
[MLIR][Affine] Fix crash in loop unswitching/hoistAffineIfOp (#130401)
Fix obvious crash as a result of missing affine.parallel handling. Also,
fix bug exposed in a helper method used by hoistAffineIfOp.

Fixes: https://github.com/llvm/llvm-project/issues/62323
2025-03-08 20:23:56 +05:30
Uday Bondhugula
e85e44ca9c
[MLIR][Affine] Fix crash in affine.for empty loop folder (#130372)
A yield value can be the loop IV itself.

Fixes: https://github.com/llvm/llvm-project/issues/74301
2025-03-08 13:36:51 +05:30
Uday Bondhugula
d4d4fc3df1
[MLIR][Affine] Fix scalrep and underlying analysis utility (#130251)
Fixes: https://github.com/llvm/llvm-project/issues/53034

Properly check the scopes of affine operations across which we are
performing affine analysis. Fixes transforms and analyses in the
presence of non-affine regions.
2025-03-08 13:36:27 +05:30
Uday Bondhugula
de1d351c64
[MLIR][Affine] Fix fusion private memref creation for multiple producer stores (#130365)
Fix private memref creation in affine fusion for the multiple producer
store
case. This scenario was not supported but not properly checked.

Fixes: https://github.com/llvm/llvm-project/issues/120227
2025-03-08 13:36:03 +05:30
Bruno Cardoso Lopes
942fb03891
[MLIR][LLVMIR] Translation: honor target-features fn attribute (#130343) 2025-03-07 19:47:51 -08:00
Bruno Cardoso Lopes
d8747eac36
[MLIR][LLVMIR] Translation: honor frame-pointer fn attribute (#130335) 2025-03-07 18:34:10 -08:00
agozillon
f1178815d2
[Flang][OpenMP][MLIR] Implement close, present and ompx_hold modifiers for Flang maps (#129586)
This PR adds an initial implementation for the map modifiers close,
present and ompx_hold, primarily just required adding the appropriate
map type flags to the map type bits. In the case of ompx_hold it
required adding the map type to the OpenMP dialect. Close has a bit of a
problem when utilised with the ALWAYS map type on descriptors, so it is
likely we'll have to make sure close and always are not applied to the
descriptor simultaneously in the future when we apply always to the
descriptors to facilitate movement of descriptor information to device
for consistency, however, we may find an alternative to this with
further investigation. For the moment, it is a TODO/Note to keep track
of it.
2025-03-07 22:22:30 +01:00
Tai Ly
dfbadfc5e5
[mlir][tosa] Change MatMul zero-point to inputs (#130332)
* Change zero-point attributes to inputs
* Fix relevant mlir tests
* Enhance ShardingInterface in MatMul

Signed-off-by: Udaya Ranga <udaya.ranga@arm.com>
Co-authored-by: Udaya Ranga <udaya.ranga@arm.com>
2025-03-07 12:37:28 -08:00
Ian Wood
813bbe055d
[mlir][linalg] Allow fusing reshapes with non-parallel operands (#130148)
Removes the condition that checks that operand is not indexed by
reduction iterators which allows for more fine-grained control via the
reshape fusion control function. For example, users could allow fusing
reshapes expand the M/N dims of a matmul but not the K dims (or preserve
the current behavior by not fusing at all).

---------

Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
2025-03-07 11:09:14 -08:00
Jerry-Ge
2619c2ed58
Revert "[mlir][tosa] Change MatMul zero-point to inputs" (#130330)
Reverts llvm/llvm-project#129785. Need rebase.
2025-03-07 11:03:38 -08:00
Corbin Robeck
50cfdf545e
[MLIR][ROCDL] Add Scale Convert Packed (B)FP8 <-> (B)F16 Support for GFX950 (#130300)
Add Rocdl support for the following GFX950 instructions:

CVT_SCALE_PK_FP8_F16
CVT_SCALE_PK_BF8_F16 
CVT_SCALE_PK_FP8_BF16 
CVT_SCALE_PK_BF8_BF16 
CVT_SCALE_SR_FP8_F16 
CVT_SCALE_SR_BF8_F16 
CVT_SCALE_SR_FP8_BF16 
CVT_SCALE_SR_BF8_BF16 
CVT_SCALE_PK_F16_FP8 
CVT_SCALE_PK_F16_BF8 
CVT_SCALE_F16_FP8 
CVT_SCALE_F16_BF8
2025-03-07 14:00:40 -05:00
Bruno Cardoso Lopes
8a43bc2c09
[MLIR][LLVMIR] Import: fix llvm.call attribute inheritance (#130221)
`inst->getFnAttr(Kind)` fallbacks to check if the parent has an
attribute, which breaks roundtriping the LLVM IR. This change actually
checks only in the call attribute list (no fallback to parent queries).

It's possible to argue that this small optimization isn't harmful, but
seems too early if it's breaking roundtrip behavior.
2025-03-07 10:59:03 -08:00
Tai Ly
106c96462f
[mlir][tosa] Change MatMul zero-point to inputs (#129785)
* Change zero-point attributes to inputs
* Fix relevant mlir tests
* Enhance ShardingInterface in MatMul

Signed-off-by: Udaya Ranga <udaya.ranga@arm.com>
Co-authored-by: Udaya Ranga <udaya.ranga@arm.com>
2025-03-07 10:46:25 -08:00
Jerry-Ge
96f369791d
[mlir][tosa] Update the description section for CastOp to align with TOSA v1.0 spec (#129958)
Updated the description section to include all data types and match the
ordering with the spec.

https://www.mlplatform.org/tosa/tosa_spec.html#_cast

Signed-off-by: Jerry Ge <jerry.ge@arm.com>
2025-03-07 10:36:43 -08:00
Jerry-Ge
ca582b1684
[mlir][tosa] Add FP8 lit tests (#127730)
Add FP8 lit tests to the following operators:

ARGMAX
AVGPOOL
CONV2D
CONV3D
DEPTHWISE_CONV2D
MATMUL
MAX_POOL2D
TRANSPOSE_CONV2D
CONST
CAST
CONCAT
PAD
RESHAPE
REVERSE
SLICE
TILE
TRANSPOSE
GATHER
SCATTER

Signed-off-by: Tai Ly <tai.ly@arm.com>
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Co-authored-by: Tai Ly <tai.ly@arm.com>
2025-03-07 10:36:27 -08:00
Tom Eccles
ca1833b91e
[mlir][OpenMP] cast address space of private variables (#130301)
Fixes #130159

The problem is that the alloca created for the private variable uses the
default alloca address space in that module, but the function the
pointer is being passed to expects a different address space, leading to
a type missmatch in the function argument.

I know nothing about how AMDGPU is supposed to work. I based this
solution on code from createDeviceArgumentAccessor(). Please could
somebody from AMD confirm this solution is appropriate.
2025-03-07 18:30:57 +00:00
Peng Sun
5685def507
[mlir][tosa] Convert RESCALE op multiplier and shift from attributes to inputs (#129720) 2025-03-07 15:59:29 +00:00
Thomas Preud'homme
659cca78a1 Revert "[mlir][TOSA] Fix linalg lowering of depthwise conv2d (#130282)"
This reverts commit e22579a6752801a5d3ced59c7a2e2499d547c657.
2025-03-07 14:19:26 +00:00
Thomas Preud'homme
e22579a675
[mlir][TOSA] Fix linalg lowering of depthwise conv2d (#130282)
Current lowering for tosa.depthwise_conv2d assumes if both zero points
are zero then it's a floating-point operation by hardcoding the use of a
arith.addf in the lowered code. Fix code to check for the element type
to decide what add operation to use.
2025-03-07 13:27:19 +00:00
Thomas Preud'homme
9d191f1182
[mlir][tosa] Fix RFFT2D verifier for width=1 (#130279)
Current formula assumes width is a multiple of 2 but TOSA only requires
a power of 2, which 1 is.
2025-03-07 13:14:55 +00:00
Tom Eccles
f7daa9d302
[mlir][OpenMP] fix crash outlining infinite loop (#129872)
Previously an extra block was created by splitting the previous exit
block. This produced incorrect results when the outlined region
statically never terminated because then there wouldn't be a valid exit
block for the outlined region, this caused this newly added block to
have an incoming edge from outside of the outlining region, which caused
outlining to fail.

So far as I can tell this extra block no longer serves any purpose. The
comment says it is supposed to collate multiple control flow edges into
one place, but the code as it is now does not achieve this. In fact, as
can be seen from the changes to lit tests, this block was not actually
outlined in the end. This is because there are actually two code
extractors: one in the callback for creating a parallel op which is used
to find what the input/output variables are (which does have this block
added to it), and another one which actually does the outlining (which
this block was not added to).

Tested with the gfortran and fujitsu test suites.

Fixes #112884
2025-03-07 11:02:52 +00:00
Matthias Springer
a21cfca320
[mlir][IR] Deprecate match and rewrite functions (#130031)
Deprecate the `match` and `rewrite` functions. They mainly exist for
historic reasons. This PR also updates all remaining uses of in the MLIR
codebase.

This is addressing a
[comment](https://github.com/llvm/llvm-project/pull/129861#pullrequestreview-2662696084)
on an earlier PR.

Note for LLVM integration: `SplitMatchAndRewrite` will be deleted soon,
update your patterns to use `matchAndRewrite` instead of separate
`match` / `rewrite`.

---------

Co-authored-by: Jakub Kuderski <jakub@nod-labs.com>
2025-03-07 08:43:01 +01:00
lonely eagle
95767a9903
[mlir][nvgpu] separate ops, types, attribute definitions in NVGPU dialect. (#129846)
It is hoped that the Ops, Types, and Attribute of the NVGPU dialect can
be defined in separate files.If downstream projects extend NVGPU and
define other Ops, the types and attributes will be used.This PR was
raised to avoid including the definition of NVGPU Ops.
2025-03-07 13:00:05 +08:00
Jerry-Ge
472c2e3578
[mlir][tosa] Update value to values for ConstOp and ConstShapeOp (#129943)
Updated the dialect to match TOSA v1.0 specification for ConstOp and
ConstShapeOp (https://www.mlplatform.org/tosa/tosa_spec.html#_const).

Also updated lit tests

---------

Signed-off-by: Jerry Ge <jerry.ge@arm.com>
2025-03-06 14:55:50 -08:00
Peter Collingbourne
d58c793673
Pass: Do not use llvm::array_pod_sort to sort OpPassManagers.
OpPassManager contains a field of type std::unique_ptr which
is not guaranteed to be trivially relocatable so we cannot use
llvm::array_pod_sort.

Reviewers: River707, joker-eph

Reviewed By: joker-eph

Pull Request: https://github.com/llvm/llvm-project/pull/129968
2025-03-06 11:20:23 -08:00
Kunwar Grover
d10dca6ba7
[mlir][Vector] Move vector.insert canonicalizers for DenseElementsAttr to folders (#128040)
This PR moves vector.insert canonicalizers for DenseElementsAttr (splat
and non splat case) to folders. Folders are local, and it's always
better to implement a folder than a canonicalizer.

This PR is mostly NFC-ish, because the functionality mostly remains
same, but is now run as part of a folder, which is why some tests are
changed, because GreedyPatternRewriter tries to fold by default.
2025-03-06 18:24:38 +00:00
Andrzej Warzyński
6701669835
[mlir][vector][nfc] Replace failure() with notifyMatchFailure() (#129278)
Updates some instances of plain `return failure();` in VectorToSCF.cpp
with `return notifyMatchFailure();` and a description (usually copied
from the nearby comment).

There's many more "plain" `return failure();` left, but ATM I only
have the cycles for the ones updated here.
2025-03-06 18:22:46 +00:00
Hongren Zheng
5ae19fad3f
[mlir] Allow trailing digit for alias in AsmPrinter (#127993)
When generating aliases from `OpAsm{Dialect,Type,Attr}Interface`, the
result would be sanitized and if the alias provided by the interface has
a trailing digit, AsmPrinter would attach an underscore to it to
presumably prevent confliction.

#### Motivation

There are two reasons to motivate the change from the old behavior to
the proposed behavior

1. If the type/attribute can generate unique alias from its content,
then the extra trailing underscore added by AsmPrinter will be strange

```mlir
  func.func @add(%ct: !ct_L0_) -> !ct_L0_
    %ct_0 = bgv.add %ct, %ct : (!ct_L0_, !ct_L0_) -> !ct_L0_
    %ct_1 = bgv.add %ct_0, %ct_0 : (!ct_L0_, !ct_L0_) -> !ct_L0_
    %ct_2 = bgv.add %ct_1, %ct_1 : (!ct_L0_, !ct_L0_) -> !ct_L0_
    return %ct_2 : !ct_L0_
  }
```

Which aesthetically would be better if we have `(!ct_L0, !ct_L0) ->
!ct_L0`

2. The Value name behavior is that, for the first instance, use no
suffix `_N`, which can be similarly applied to alias name. See the IR
above where the first one is called `%ct` and others are called `%ct_N`.
See `uniqueValueName` for detail.

#### Conflict detection


```mlir
!test.type<a = 3> // suggest !name0
!test.type<a = 4> // suggest !name0
!test.another<b = 3> // suggest !name0_
!test.another<b = 4> // suggest !name0_
```

The conflict detection is based on `nameCounts` in `initializeAliases`,
where

In the original way, the first two will get sanitized to `!name0_` and
`initializeAlias` can assign unique id `0, 1, 2, 3` to them.

In the current way, the `initializeAlias` uses `usedAliases` to track
which name has been used, and use such information to generate a suffix
id that will make the printed alias name unique.

The result for the above example is `!name0, !name0_1, !name0_,
!name0_2` now.
2025-03-07 00:35:00 +08:00
Benjamin Chetioui
32f543760c
Revert "[mlir][ODS] Add a generated builder that takes the Properties struct" (#130117)
Reverts llvm/llvm-project#124713.

Builders involving sanitizers are failing:
https://lab.llvm.org/buildbot/#/builders/169/builds/9106.
2025-03-06 16:31:10 +01:00
Jie Fu
20d955ce2a [mlir] Remove extra ';' outside of a function (NFC)
/llvm-project/mlir/lib/Conversion/MeshToMPI/MeshToMPI.cpp:70:2:
error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
};
 ^
1 error generated.
2025-03-06 19:27:43 +08:00
lorenzo chelini
1a3dc8e9c7
[MLIR][NFC] Retire let constructor for Bufferization (#129850)
`let constructor` is legacy (do not use in tree!) since the table gen
backend emits most of the glue logic to build a pass.
2025-03-06 11:49:00 +01:00
lorenzo chelini
556a64507b
[MLIR][NFC] Retire let constructor for GPU (#129849)
`let constructor` is legacy (do not use in tree!) since the table gen
backend emits most of the glue logic to build a pass.
2025-03-06 11:48:24 +01:00
Andrzej Warzynski
5ce4045384 [mlir][nfc] Fix typo in LIT RUN line
Failing bot:
* https://lab.llvm.org/buildbot/#/builders/17/builds/6269

The offending test was added in:
  * https://github.com/llvm/llvm-project/pull/129696

To fix this, use:
* `%mcr_aarch64_cmd` (which is what we used for ArmSVE e2e tests),

Instead of:

* `mlir-cpu-runner` (which was renamed to `mlir-runner` in #123776).

Committed without review due to being a trivial test update; if this
needs discussion, please ping me or leave a comment on GitHub.
2025-03-06 10:31:18 +00:00
Zichen Lu
2ec16ee28b
[mlir][target] Adjust the start position of the moduleToObject timer (#129835)
As title. To avoid `Ungrouped Timers` when the target is `Assembly `.
2025-03-06 11:09:12 +01:00
Frank Schlimbach
6e57326c61
[mlir][mesh, mpi] More on MeshToMPI (#129048)
- do not create MPI operations if no halo exchange is needed
- allow returning sharding information through `!mesh.sharding`
  (gets converted into a tuple of tensors)
- lowering `mesh.shard_shape` including fixes to the operation itself
- global symbol `static_mpi_rank` replaced by an DLTI attribute
  (now aligned with MPIToLLVM)
- smaller fixes and some minor cleanup

---------

Co-authored-by: Christian Ulmann <christianulmann@gmail.com>
2025-03-06 10:47:06 +01:00
Luke Hutton
4f46b75fb0
[mlir][tosa] Add expected output shape check to argmax verifier (#129870)
Fixes some test cases which incorrectly declared the output shape and
added a negative test case.

Signed-off-by: Luke Hutton <luke.hutton@arm.com>
2025-03-06 09:40:19 +00:00
Jerry-Ge
4554b30051
[mlir][tosa] Update ConstOp to use Tosa_Tensor (#129959)
Since we already defined Tosa_Tensor in TosaTypesBase.td, updated
ConstOp to use that.

Signed-off-by: Jerry Ge <jerry.ge@arm.com>
2025-03-06 09:39:20 +00:00
Nikita Popov
979c275097
[IR] Store Triple in Module (NFC) (#129868)
The module currently stores the target triple as a string. This means
that any code that wants to actually use the triple first has to
instantiate a Triple, which is somewhat expensive. The change in #121652
caused a moderate compile-time regression due to this. While it would be
easy enough to work around, I think that architecturally, it makes more
sense to store the parsed Triple in the module, so that it can always be
directly queried.

For this change, I've opted not to add any magic conversions between
std::string and Triple for backwards-compatibilty purses, and instead
write out needed Triple()s or str()s explicitly. This is because I think
a decent number of them should be changed to work on Triple as well, to
avoid unnecessary conversions back and forth.

The only interesting part in this patch is that the default triple is
Triple("") instead of Triple() to preserve existing behavior. The former
defaults to using the ELF object format instead of unknown object
format. We should fix that as well.
2025-03-06 10:27:47 +01:00
Andrzej Warzyński
620c38371d
[mlir][nfc] De-duplicate tests from Type::isIntOrFloat (#129710)
This PR makes sure that we always use `Type::isIntOrFloat` rather than
re-implementing this condition inline. Also, it removes `isScalarType`
that effectively re-implemented this method.
2025-03-06 09:04:30 +00:00
Kunwar Grover
8e0a63ddad
[mlir][docs] Add docs on canonicalizers being folders or patterns (#129517)
If a transformation should be a canonicalization is an orthogonal
question to if a transformation should be implemented as a
`RewritePattern` or a `fold` method. The later is an implementation
detail.

This patch adds a suggestion to always implement a canonicalization as a
`fold` pattern if possible, as they are a restricted subset of a
`RewritePattern`.

This has been a common source of confusion, as to when to implement a
canonicalization as a fold method or a RewritePattern.
2025-03-06 08:41:47 +00:00
Matthias Springer
a6151f4e23
[mlir][IR] Move match and rewrite functions into separate class (#129861)
The vast majority of rewrite / conversion patterns uses a combined
`matchAndRewrite` instead of separate `match` and `rewrite` functions.

This PR optimizes the code base for the most common case where users
implement a combined `matchAndRewrite`. There are no longer any `match`
and `rewrite` functions in `RewritePattern`, `ConversionPattern` and
their derived classes. Instead, there is a `SplitMatchAndRewriteImpl`
class that implements `matchAndRewrite` in terms of `match` and
`rewrite`.

Details:
* The `RewritePattern` and `ConversionPattern` classes are simpler
(fewer functions). Especially the `ConversionPattern` class, which now
has 5 fewer functions. (There were various `rewrite` overloads to
account for 1:1 / 1:N patterns.)
* There is a new class `SplitMatchAndRewriteImpl` that derives from
`RewritePattern` / `OpRewritePatern` / ..., along with a type alias
`RewritePattern::SplitMatchAndRewrite` for convenience.
* Fewer `llvm_unreachable` are needed throughout the code base. Instead,
we can use pure virtual functions. (In cases where users previously had
to implement `rewrite` or `matchAndRewrite`, etc.)
* This PR may also improve the number of [`-Woverload-virtual`
warnings](https://discourse.llvm.org/t/matchandrewrite-hiding-virtual-functions/84933)
that are produced by GCC. (To be confirmed...)

Note for LLVM integration: Patterns with separate `match` / `rewrite`
implementations, must derive from `X::SplitMatchAndRewrite` instead of
`X`.

---------

Co-authored-by: River Riddle <riddleriver@gmail.com>
2025-03-06 08:48:51 +01:00
Lang Hames
b18e5b6a36 Re-apply "[ORC] Remove the Triple argument from LLJITBuilder::..." with fixes.
This re-applies f905bf3e1ef860c4d6fe67fb64901b6bbe698a91, which was reverted in
c861c1a046eb8c1e546a8767e0010904a3c8c385 due to compiler errors, with a fix for
MLIR.
2025-03-06 17:17:05 +11:00
Bruno Cardoso Lopes
aea74034eb
[MLIR][LLVMIR] Add elementtype attribute (#129918)
These are very common when using intrinsics (e.g. ARM NEON).

For more context: ClangIR has currently been blocked on such intrinsics
emission because of this lacking capability.
2025-03-05 15:21:45 -08:00
Bruno Cardoso Lopes
2bbe30bf35
[MLIR][LLVMIR] llvm.call_intrinsic: support operand/result attributes (#129640)
Basically catch up with llvm.call and add support for translate and
import to LLVM IR.

This PR is split into two commits in case it's easier to review the
refactoring part, which comes first (happy to split the PR if
necessary).

---------

Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com>
2025-03-05 11:27:01 -08:00
Krzysztof Drewniak
35622a93bb
[mlir][ODS] Add a generated builder that takes the Properties struct (#124713)
This commit adds builders of the form

```
static void build(..., [TypeRange resultTypes],
                  ValueRange operands, const Properties &properties,
                  ArrayRef<NamedAttribute> discardableAttributes = {},
                  [unsigned numRegions]);
```
to go alongside the existing
result/operands/[inherent + discardable attribute list] collective
builders.

This change is intended to support a refactor to the declarative rewrite
engine to make it populate the `Properties` struct instead of creating a
`DictionaryAttr`, thus enabling rewrite rules to handle non-`Attribute`
properties.

More generally, this means that generic code that would previously call
`getAttrs()` to blend together inherent and discardable attributes can
now use `getProperties()` and `getDiscardableAttrs()` separately, thus
removing the need to serialize everything into a temporary
`DictionaryAttr`.
2025-03-05 13:17:40 -06:00
Andrzej Warzyński
9f0a912a46
[mlir][test][sve] Add e2e test for linalg.pack + linalg.unpack (#129696)
This patch adds an e2e test for the `linalg.pack` + `linalg.unpack` pair
with a dynamic inner tile size that's tied to SVE's "vscale":

```mlir
  %c4 = arith.constant 4 : index
  %vs = vector.vscale
  %tile_size = arith.muli %c4, %vs : index
```

This means that the actual size of the corresponding inner and outer
tile size will depend on the runtime value of "vscale".

To make the new test deterministic (and to make it easier to
experiment), I have hard-coded the value of "vscale" to 2 via (2 x 128
bits = 256 bits):
```mlir
`func.call @setArmVLBits(%c256) : (i32) -> ()
```
This can be relaxed at a later time or played with when experimenting
locally with e.g. QEMU.

NOTE: Vectorization has not been enabled yet (scalable vectorization of
`linalg.unpack` is still WIP).
2025-03-05 18:47:47 +00:00
Jerry-Ge
db70d76082
[mlir][tosa] Add more verifiers for the following operators (#127923)
For ConcatOp this commit also enhances the verifier by
checking 4 another conditions:
- The input list is not empty
- The axis value is within range of the input shapes
- All inputs have the same rank
- All non concatenate axis dims have the same value

For MatmulOp:
- Checked input a, bs tensor type, element types

For the following operators, added the verifySameElementTypes check.
- PadOp
- SliceOp
- TileOp
- ReshapeOp
- TransposeOp
- GatherOp
- ScatterOp
- MaxPool2dOp
- ReverseOp
- SelectOp

Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Co-authored-by: Tai Ly <tai.ly@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
2025-03-05 10:12:20 -08:00