Enable GDA+IPC (#249)
* Enable GDA+IPC Fix ROCSHMEM_DISABLE_IPC for both RO and GDA * add more functionality to bootstrap class we need a few more functions in the boostrap class to be able to fully handle the rocshmem requirements: - add a function to return the list of local ranks - provide a groupAllgather operation which takes a vector of ranks participating - provide a groupAlltoall operation which takes a vector of ranks participating Also, update the functionality of the gda-Alltoall and gda-Allreduce operations to take advantage of these functions. * ipc_policy adapted to use bootstrap groupallgather * bugfix: there was a mistake in computing sendto in groupallgather * bugfix: shm_size and shm_rank were set in a local variable rather than the class member * mpi-bootstrap: remove an unecessary allgather --------- Co-authored-by: Edgar Gabriel <Edgar.Gabriel@amd.com>
Tento commit je obsažen v:
+12
-12
@@ -35,15 +35,15 @@
|
||||
|
||||
#include "backend_bc.hpp"
|
||||
#include "context_incl.hpp"
|
||||
#if defined(USE_RO)
|
||||
#if defined(USE_GDA)
|
||||
#include "gda/backend_gda.hpp"
|
||||
#include "gda/context_gda_tmpl_host.hpp"
|
||||
#elif defined(USE_RO)
|
||||
#include "reverse_offload/backend_ro.hpp"
|
||||
#include "reverse_offload/context_ro_tmpl_host.hpp"
|
||||
#elif defined(USE_IPC)
|
||||
#include "ipc/backend_ipc.hpp"
|
||||
#include "ipc/context_ipc_tmpl_host.hpp"
|
||||
#elif defined(USE_GDA)
|
||||
#include "gda/backend_gda.hpp"
|
||||
#include "gda/context_gda_tmpl_host.hpp"
|
||||
#else
|
||||
#error "Select one backend among USE_RO, USE_IPC, USE_GDA"
|
||||
#endif
|
||||
@@ -94,15 +94,15 @@ rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
|
||||
|
||||
mpi_instance = new MPIInstance(comm);
|
||||
|
||||
#if defined(USE_RO)
|
||||
#if defined(USE_GDA)
|
||||
CHECK_HIP(hipHostMalloc(&backend, sizeof(GDABackend)));
|
||||
backend = new (backend) GDABackend(comm);
|
||||
#elif defined(USE_RO)
|
||||
CHECK_HIP(hipHostMalloc(&backend, sizeof(ROBackend)));
|
||||
backend = new (backend) ROBackend(comm);
|
||||
#elif defined(USE_IPC)
|
||||
CHECK_HIP(hipHostMalloc(&backend, sizeof(IPCBackend)));
|
||||
backend = new (backend) IPCBackend(comm);
|
||||
#elif defined(USE_GDA)
|
||||
CHECK_HIP(hipHostMalloc(&backend, sizeof(GDABackend)));
|
||||
backend = new (backend) GDABackend(comm);
|
||||
#endif
|
||||
|
||||
if (!backend) {
|
||||
@@ -174,15 +174,15 @@ rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
|
||||
|
||||
rocm_init();
|
||||
|
||||
#if defined(USE_RO)
|
||||
#if defined(USE_GDA)
|
||||
CHECK_HIP(hipHostMalloc(&backend, sizeof(GDABackend)));
|
||||
backend = new (backend) GDABackend(bootstrap);
|
||||
#elif defined(USE_RO)
|
||||
printf("RO Backend requires MPI library to be initialized, even when using uniqueId initializations!\n");
|
||||
abort();
|
||||
#elif defined(USE_IPC)
|
||||
CHECK_HIP(hipHostMalloc(&backend, sizeof(IPCBackend)));
|
||||
backend = new (backend) IPCBackend(bootstrap);
|
||||
#elif defined(USE_GDA)
|
||||
CHECK_HIP(hipHostMalloc(&backend, sizeof(GDABackend)));
|
||||
backend = new (backend) GDABackend(bootstrap);
|
||||
#endif
|
||||
|
||||
if (!backend) {
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele