modified team based to_all -> reduce
This commit is contained in:
committed by
Yiltan Temucin
parent
75ece02048
commit
997eb69b5a
@@ -122,8 +122,7 @@ class IPCContext : public Context {
|
||||
|
||||
// Collectives
|
||||
template <typename T, ROC_SHMEM_OP Op>
|
||||
__device__ void to_all(roc_shmem_team_t team, T *dest, const T *source,
|
||||
int nreduce);
|
||||
__device__ int reduce(roc_shmem_team_t team, T *dest, const T *source, int nreduce);
|
||||
|
||||
template <typename T>
|
||||
__device__ void broadcast(roc_shmem_team_t team, T *dest, const T *source,
|
||||
|
||||
@@ -95,8 +95,7 @@ class IPCHostContext : public Context {
|
||||
long *p_sync);
|
||||
|
||||
template <typename T, ROC_SHMEM_OP Op>
|
||||
__host__ void to_all(roc_shmem_team_t team, T *dest, const T *source,
|
||||
int nreduce);
|
||||
__host__ int reduce(roc_shmem_team_t team, T *dest, const T *source, int nreduce);
|
||||
|
||||
template <typename T>
|
||||
__host__ void wait_until(T *ivars, int cmp, T val);
|
||||
|
||||
@@ -151,7 +151,7 @@ __device__ T IPCContext::amo_fetch_cas(void *dest, T value, T cond, int pe) {
|
||||
reinterpret_cast<T *>(ipcImpl_.ipc_bases[pe] + L_offset), cond,
|
||||
value);
|
||||
}
|
||||
|
||||
|
||||
// Collectives
|
||||
template <typename T, ROC_SHMEM_OP Op>
|
||||
__device__ void compute_reduce(T *src, T *dst, int size, int wg_id,
|
||||
@@ -346,8 +346,8 @@ __device__ void IPCContext::internal_ring_allreduce(
|
||||
}
|
||||
|
||||
template <typename T, ROC_SHMEM_OP Op>
|
||||
__device__ void IPCContext::to_all(roc_shmem_team_t team, T *dest,
|
||||
const T *source, int nreduce) {
|
||||
__device__ int IPCContext::reduce(roc_shmem_team_t team, T *dest,
|
||||
const T *source, int nreduce) {
|
||||
IPCTeam *team_obj = reinterpret_cast<IPCTeam *>(team);
|
||||
|
||||
/**
|
||||
@@ -361,6 +361,7 @@ __device__ void IPCContext::to_all(roc_shmem_team_t team, T *dest,
|
||||
|
||||
internal_to_all<T, Op>(dest, source, nreduce, pe_start, stride, pe_size, pWrk,
|
||||
p_sync);
|
||||
return ROC_SHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
template <typename T, ROC_SHMEM_OP Op>
|
||||
|
||||
@@ -109,9 +109,9 @@ __host__ void IPCHostContext::to_all(T *dest, const T *source, int nreduce,
|
||||
}
|
||||
|
||||
template <typename T, ROC_SHMEM_OP Op>
|
||||
__host__ void IPCHostContext::to_all(roc_shmem_team_t team, T *dest,
|
||||
__host__ int IPCHostContext::reduce(roc_shmem_team_t team, T *dest,
|
||||
const T *source, int nreduce) {
|
||||
host_interface->to_all<T, Op>(team, dest, source, nreduce);
|
||||
return host_interface->reduce<T, Op>(team, dest, source, nreduce);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user