16 Commits

Author SHA1 Message Date
Frank Schlimbach
26b1f61c14
[mlir][shard,mpi] Fixing lowering allgather shard->mpi->llvm (#178870)
`shard.allgather` concatenates along a specified gather-axis. However,
`mpi.allgather` always concatenates along the first dimension and there
is no MPI operation that allows gathering along an arbitrary axis.
Hence, if gather-axis!=0, we need to create a temporary buffer where we
gather along the first dimension and then copy from that buffer to the
final output along the specified gather-axis. This is not ideal by far.

Along the way also
- fixing computation of memref size in mpitollvm
- adding a simple canonicalization pattern for comm_size for easier
debugging
- adding more tests
2026-02-04 18:36:03 +01:00
Frank Schlimbach
9543fc766d
[mlir][mpi] adding MPI_Allgather and lowering to LLVM (#176937)
- Adding MPI_Allgather to MPI dialect
- Adding lowering to MPIToLLVM
- Also lowering MPI_Commsize (see also #140392)
2026-01-21 12:24:18 +01:00
Mehdi Amini
4237ec343a [MLIR] Apply clang-tidy fixes for readability-avoid-const-params-in-decls in MPIToLLVM.cpp (NFC) 2025-11-28 05:35:44 -08:00
Mehdi Amini
9ee1f159dc [MLIR] Apply clang-tidy fixes for llvm-qualified-auto in MPIToLLVM.cpp (NFC) 2025-09-14 05:37:34 -07:00
Daniel Kuts
671455ae3f
[mlir] Fix possible null dereference during error logging (#157455)
Fixes #157451
2025-09-10 09:10:11 +08:00
Maksim Levental
258daf5395
[mlir][NFC] update mlir create APIs (34/n) (#150660)
See https://github.com/llvm/llvm-project/pull/147168 for more info.
2025-07-25 12:36:54 -05:00
Maksim Levental
4ae9fdca8a
[mlir][NFC] update Conversion create APIs (6/n) (#149888)
See https://github.com/llvm/llvm-project/pull/147168 for more info.
2025-07-22 08:16:53 -04:00
Frank Schlimbach
8584b216b8
Lower allreduce (#144716)
Adding lowering mesh.allreduce to mpi.allreduce.
Minor restructuring to increase code reuse.
2025-06-23 14:01:17 +02:00
Frank Schlimbach
586c5e3083
[mlir][mpi] fixing in-place and 0d mpi.all_reduce (#134225)
* inplace allreduce needs special MPI token MPI_IN_PLACE as send buffer
* 0d tensors have no sizes/strides in LLVM memref struct
2025-04-03 15:53:40 +02:00
Frank Schlimbach
49f080afc4
[mlir][mpi] Mandatory Communicator (#133280)
This is replacing #125361
- communicator is mandatory
- new mpi.comm_world
- new mp.comm_split
- lowering and test

---------

Co-authored-by: Sergio Sánchez Ramírez <sergio.sanchez.ramirez+git@bsc.es>
2025-04-01 08:58:55 +02:00
Frank Schlimbach
1dee12531d
[mlir][mpi] Lowering MPI_Allreduce (#133133)
Lowering of mpi.all_reduce to LLVM function call
2025-03-31 12:51:45 +02:00
Adrian Kuegel
cd4c10afea [mlir] Apply ClangTidy finding (NFC)
prefer using 'override' or (rarely) 'final' instead of 'virtual'
second attempt
2025-03-04 12:20:35 +00:00
Adrian Kuegel
66d4294a77 Revert "[mlir] Apply ClangTidy finding (NFC)"
This reverts commit b25b38412807615d2e54702435f67b5c5b7170c0.

Applied the finding manually and got it wrong.
2025-03-04 12:16:33 +00:00
Adrian Kuegel
b25b384128 [mlir] Apply ClangTidy finding (NFC)
prefer using 'override' or (rarely) 'final' instead of 'virtual'
2025-03-04 12:12:07 +00:00
Kazu Hirata
386a45c6bd [mlir] Fix warnings
This patch fixes:

  include/c++/14/bits/unique_ptr.h:93:2: error: delete called on
  non-final '(anonymous namespace)::MPICHImplTraits' that has virtual
  functions but non-virtual destructor
  [-Werror,-Wdelete-non-abstract-non-virtual-dtor]
2025-02-21 10:20:04 -08:00
Frank Schlimbach
ab166d4d10
[mlir][mpi] Lowering Mpi To LLVM (#127053)
* The first set of patterns to convert the MPI dialect to LLVM.
* Further conversion pattern will be added in future PRs.
* Supports MPICH compatible MPI implementations and openMPI, selectable through DLTI attribute on module

---------

Co-authored-by: Anton Lydike <me@antonlydike.de>
Co-authored-by: Christian Ulmann <christianulmann@gmail.com>
2025-02-21 18:03:04 +01:00