Skip to content

Commit 450ea66

Browse files
committed
oshmem: Align OSHMEM API with spec v1.3 (update spml/ucx)
1 parent e0d8722 commit 450ea66

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

oshmem/mca/spml/ucx/spml_ucx.c

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ mca_spml_ucx_t mca_spml_ucx = {
5353
mca_spml_ucx_deregister,
5454
mca_spml_base_oob_get_mkeys,
5555
mca_spml_ucx_put,
56-
mca_spml_base_put_nb, /* todo: mca_spml_ucx_put_nb, */
56+
mca_spml_ucx_put_nb,
5757
mca_spml_ucx_get,
58-
mca_spml_base_get_nb, /* todo: mca_spml_ucx_get_nb, */
58+
mca_spml_ucx_get_nb,
5959
mca_spml_ucx_recv,
6060
mca_spml_ucx_send,
6161
mca_spml_base_wait,
@@ -391,6 +391,19 @@ int mca_spml_ucx_get(void *src_addr, size_t size, void *dst_addr, int src)
391391
return ucx_status_to_oshmem(status);
392392
}
393393

394+
int mca_spml_ucx_get_nb(void *src_addr, size_t size, void *dst_addr, int src, void **handle)
395+
{
396+
void *rva;
397+
ucs_status_t status;
398+
spml_ucx_mkey_t *ucx_mkey;
399+
400+
ucx_mkey = mca_spml_ucx_get_mkey(src, src_addr, &rva);
401+
status = ucp_get_nbi(mca_spml_ucx.ucp_peers[src].ucp_conn, dst_addr, size,
402+
(uint64_t)rva, ucx_mkey->rkey);
403+
404+
return ucx_status_to_oshmem(status);
405+
}
406+
394407
int mca_spml_ucx_put(void* dst_addr, size_t size, void* src_addr, int dst)
395408
{
396409
void *rva;
@@ -404,6 +417,19 @@ int mca_spml_ucx_put(void* dst_addr, size_t size, void* src_addr, int dst)
404417
return ucx_status_to_oshmem(status);
405418
}
406419

420+
int mca_spml_ucx_put_nb(void* dst_addr, size_t size, void* src_addr, int dst, void **handle)
421+
{
422+
void *rva;
423+
ucs_status_t status;
424+
spml_ucx_mkey_t *ucx_mkey;
425+
426+
ucx_mkey = mca_spml_ucx_get_mkey(dst, dst_addr, &rva);
427+
status = ucp_put_nbi(mca_spml_ucx.ucp_peers[dst].ucp_conn, src_addr, size,
428+
(uint64_t)rva, ucx_mkey->rkey);
429+
430+
return ucx_status_to_oshmem(status);
431+
}
432+
407433
int mca_spml_ucx_fence(void)
408434
{
409435
ucs_status_t err;

oshmem/mca/spml/ucx/spml_ucx.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ extern int mca_spml_ucx_get(void* dst_addr,
7070
size_t size,
7171
void* src_addr,
7272
int src);
73+
extern int mca_spml_ucx_get_nb(void* dst_addr,
74+
size_t size,
75+
void* src_addr,
76+
int src,
77+
void **handle);
7378

7479
extern int mca_spml_ucx_put(void* dst_addr,
7580
size_t size,

0 commit comments

Comments
 (0)