open-mpi / ompi

Open MPI main development repository
https://www.open-mpi.org
Other
2.13k stars 858 forks source link

Add accelerator-awareness to most allreduce implementations #12611

Open devreal opened 3 months ago

devreal commented 3 months ago

This is the fifth patch based on #12318 and introduces accelerator-awareness for the most of the allreduce implementations in coll/base. There were changes introduced to ompi_coll_base_allreduce_intra_allgather_reduce, which led to conflicts. These implementations will still need to be adapted.

This PR relies on the following PRs:

Adding accelerator-awareness requires allocation of temporary memory on the a device selected based on the input buffer (possibly cached by the allocator) and reintroduces the use of 3buff reductions to combine copy and operator application. This change also improves performance on CPU for larger operations. Where possible