Skip to content

Commit 82ba977

Browse files
author
ferrol aderholdt
committed
scoll/ucc: add onesided ucc support
Signed-off-by: ferrol aderholdt <faderholdt@nvidia.com>
1 parent fcc41d7 commit 82ba977

File tree

7 files changed

+181
-79
lines changed

7 files changed

+181
-79
lines changed

oshmem/mca/scoll/ucc/scoll_ucc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ struct mca_scoll_ucc_module_t {
6161

6262
oshmem_group_t *group;
6363
ucc_team_h ucc_team;
64+
long *pSync;
6465

6566
/* Saved handlers - for fallback */
6667
mca_scoll_base_module_reduce_fn_t previous_reduce;
@@ -81,6 +82,9 @@ OBJ_CLASS_DECLARATION(mca_scoll_ucc_module_t);
8182
/* API functions */
8283
int mca_scoll_ucc_init_query(bool enable_progress_threads, bool enable_mpi_threads);
8384

85+
int mca_scoll_ucc_team_create(mca_scoll_ucc_module_t *ucc_module,
86+
oshmem_group_t *osh_group);
87+
8488
mca_scoll_base_module_t* mca_scoll_ucc_comm_query(oshmem_group_t *osh_group, int *priority);
8589

8690
int mca_scoll_ucc_barrier(struct oshmem_group_t *group, long *pSync, int alg);

oshmem/mca/scoll/ucc/scoll_ucc_alltoall.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static inline ucc_status_t mca_scoll_ucc_alltoall_init(const void *sbuf, void *r
2828
}
2929

3030
ucc_coll_args_t coll = {
31-
.mask = 0,
31+
.mask = UCC_COLL_ARGS_FIELD_FLAGS | UCC_COLL_ARGS_FIELD_GLOBAL_WORK_BUFFER,
3232
.coll_type = UCC_COLL_TYPE_ALLTOALL,
3333
.src.info = {
3434
.buffer = (void *)sbuf,
@@ -42,8 +42,15 @@ static inline ucc_status_t mca_scoll_ucc_alltoall_init(const void *sbuf, void *r
4242
.datatype = dt,
4343
.mem_type = UCC_MEMORY_TYPE_UNKNOWN
4444
},
45+
.flags = UCC_COLL_ARGS_FLAG_MEM_MAPPED_BUFFERS,
46+
.global_work_buffer = ucc_module->pSync,
4547
};
4648

49+
if (NULL == ucc_module->ucc_team) {
50+
if (OSHMEM_ERROR == mca_scoll_ucc_team_create(ucc_module, ucc_module->group)) {
51+
return OSHMEM_ERROR;
52+
}
53+
}
4754
SCOLL_UCC_REQ_INIT(req, coll, ucc_module);
4855
return UCC_OK;
4956
fallback:

oshmem/mca/scoll/ucc/scoll_ucc_barrier.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ static inline ucc_status_t mca_scoll_ucc_barrier_init(mca_scoll_ucc_module_t * u
1919
.mask = 0,
2020
.coll_type = UCC_COLL_TYPE_BARRIER
2121
};
22+
if (NULL == ucc_module->ucc_team) {
23+
if (OSHMEM_ERROR == mca_scoll_ucc_team_create(ucc_module, ucc_module->group)) {
24+
return OSHMEM_ERROR;
25+
}
26+
}
2227
SCOLL_UCC_REQ_INIT(req, coll, ucc_module);
2328
return UCC_OK;
2429
fallback:

oshmem/mca/scoll/ucc/scoll_ucc_broadcast.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ static inline ucc_status_t mca_scoll_ucc_broadcast_init(void * buf, int count,
2828
.mem_type = UCC_MEMORY_TYPE_UNKNOWN
2929
}
3030
};
31+
if (NULL == ucc_module->ucc_team) {
32+
if (OSHMEM_ERROR == mca_scoll_ucc_team_create(ucc_module, ucc_module->group)) {
33+
return OSHMEM_ERROR;
34+
}
35+
}
3136
SCOLL_UCC_REQ_INIT(req, coll, ucc_module);
3237
return UCC_OK;
3338
fallback:

oshmem/mca/scoll/ucc/scoll_ucc_collect.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ static inline ucc_status_t mca_scoll_ucc_collect_init(const void * sbuf, void *
3434
},
3535
};
3636

37+
if (NULL == ucc_module->ucc_team) {
38+
if (OSHMEM_ERROR == mca_scoll_ucc_team_create(ucc_module, ucc_module->group)) {
39+
return OSHMEM_ERROR;
40+
}
41+
}
3742
SCOLL_UCC_REQ_INIT(req, coll, ucc_module);
3843
return UCC_OK;
3944
fallback:

0 commit comments

Comments
 (0)