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>
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
3100d71f4b
commit
801d2c5012
@@ -27,12 +27,12 @@
|
||||
#include "backend_type.hpp"
|
||||
#include "context_incl.hpp"
|
||||
|
||||
#if defined(USE_RO)
|
||||
#if defined(USE_GDA)
|
||||
#include "gda/backend_gda.hpp"
|
||||
#elif defined(USE_RO)
|
||||
#include "reverse_offload/backend_ro.hpp"
|
||||
#elif defined(USE_IPC)
|
||||
#include "ipc/backend_ipc.hpp"
|
||||
#elif defined(USE_GDA)
|
||||
#include "gda/backend_gda.hpp"
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
@@ -249,22 +249,22 @@ void Backend::reset_stats() {
|
||||
}
|
||||
|
||||
__device__ bool Backend::create_ctx(int64_t option, rocshmem_ctx_t* ctx) {
|
||||
#if defined(USE_RO)
|
||||
#if defined(USE_GDA)
|
||||
return static_cast<GDABackend*>(this)->create_ctx(option, ctx);
|
||||
#elif defined(USE_RO)
|
||||
return static_cast<ROBackend*>(this)->create_ctx(option, ctx);
|
||||
#elif defined(USE_IPC)
|
||||
return static_cast<IPCBackend*>(this)->create_ctx(option, ctx);
|
||||
#elif defined(USE_GDA)
|
||||
return static_cast<GDABackend*>(this)->create_ctx(option, ctx);
|
||||
#endif
|
||||
}
|
||||
|
||||
__device__ void Backend::destroy_ctx(rocshmem_ctx_t* ctx) {
|
||||
#if defined(USE_RO)
|
||||
#if defined(USE_GDA)
|
||||
static_cast<GDABackend*>(this)->destroy_ctx(ctx);
|
||||
#elif defined(USE_RO)
|
||||
static_cast<ROBackend*>(this)->destroy_ctx(ctx);
|
||||
#elif defined(USE_IPC)
|
||||
static_cast<IPCBackend*>(this)->destroy_ctx(ctx);
|
||||
#elif defined(USE_GDA)
|
||||
static_cast<GDABackend*>(this)->destroy_ctx(ctx);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user