Skip to content

Commit

Permalink
UCT: Define missing MD operations to stub functions
Browse files Browse the repository at this point in the history
  • Loading branch information
yosefe committed Feb 5, 2025
1 parent 8490fce commit 03d591c
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 29 deletions.
5 changes: 3 additions & 2 deletions src/uct/cuda/cuda_copy/cuda_copy_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,11 +832,12 @@ static uct_md_ops_t md_ops = {
.query = uct_cuda_copy_md_query,
.mem_alloc = uct_cuda_copy_mem_alloc,
.mem_free = uct_cuda_copy_mem_free,
.mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_success,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_cuda_copy_mem_reg,
.mem_dereg = uct_cuda_copy_mem_dereg,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = uct_cuda_copy_md_mem_query,
.mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_success,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = uct_cuda_copy_md_detect_memory_type
};

Expand Down
6 changes: 5 additions & 1 deletion src/uct/cuda/cuda_ipc/cuda_ipc_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,13 @@ uct_cuda_ipc_md_open(uct_component_t *component, const char *md_name,
static uct_md_ops_t md_ops = {
.close = uct_cuda_ipc_md_close,
.query = uct_cuda_ipc_md_query,
.mkey_pack = uct_cuda_ipc_mkey_pack,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_cuda_ipc_mem_reg,
.mem_dereg = uct_cuda_ipc_mem_dereg,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_cuda_ipc_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
};
Expand Down
13 changes: 11 additions & 2 deletions src/uct/cuda/gdr_copy/gdr_copy_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,13 @@ static void uct_gdr_copy_md_close(uct_md_h uct_md)
static uct_md_ops_t uct_gdr_copy_md_ops = {
.close = uct_gdr_copy_md_close,
.query = uct_gdr_copy_md_query,
.mkey_pack = uct_gdr_copy_mkey_pack,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_gdr_copy_mem_reg,
.mem_dereg = uct_gdr_copy_mem_dereg,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_gdr_copy_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
};
Expand Down Expand Up @@ -372,9 +376,14 @@ uct_gdr_copy_mem_rcache_dereg(uct_md_h uct_md,
static uct_md_ops_t uct_gdr_copy_md_rcache_ops = {
.close = uct_gdr_copy_md_close,
.query = uct_gdr_copy_md_query,
.mkey_pack = uct_gdr_copy_mkey_pack,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_gdr_copy_mem_rcache_reg,
.mem_dereg = uct_gdr_copy_mem_rcache_dereg,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_gdr_copy_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
};

Expand Down
7 changes: 5 additions & 2 deletions src/uct/ib/base/ib_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,11 +1563,14 @@ static uct_ib_md_ops_t uct_ib_verbs_md_ops = {
.super = {
.close = uct_ib_md_close,
.query = uct_ib_md_query,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = uct_ib_mem_advise,
.mem_reg = uct_ib_verbs_mem_reg,
.mem_dereg = uct_ib_verbs_mem_dereg,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_advise = uct_ib_mem_advise,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_ib_verbs_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
},
.open = uct_ib_verbs_md_open,
Expand Down
7 changes: 5 additions & 2 deletions src/uct/ib/efa/base/ib_efa_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,14 @@ static uct_ib_md_ops_t uct_ib_efa_md_ops = {
.super = {
.close = uct_ib_md_close,
.query = uct_ib_md_query,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = uct_ib_mem_advise,
.mem_reg = uct_ib_verbs_mem_reg,
.mem_dereg = uct_ib_verbs_mem_dereg,
.mem_attach =(uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_advise = uct_ib_mem_advise,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_ib_verbs_mkey_pack,
.mem_attach =(uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
},
.open = uct_ib_efa_md_open,
Expand Down
14 changes: 9 additions & 5 deletions src/uct/ib/mlx5/dv/ib_mlx5dv_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3105,11 +3105,12 @@ static uct_ib_md_ops_t uct_ib_mlx5_devx_md_ops = {
.query = uct_ib_mlx5_devx_md_query,
.mem_alloc = uct_ib_mlx5_devx_device_mem_alloc,
.mem_free = uct_ib_mlx5_devx_device_mem_free,
.mem_advise = uct_ib_mem_advise,
.mem_reg = uct_ib_mlx5_devx_mem_reg,
.mem_dereg = uct_ib_mlx5_devx_mem_dereg,
.mem_attach = uct_ib_mlx5_devx_mem_attach,
.mem_advise = uct_ib_mem_advise,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_ib_mlx5_devx_mkey_pack,
.mem_attach = uct_ib_mlx5_devx_mem_attach,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
},
.open = uct_ib_mlx5_devx_md_open,
Expand Down Expand Up @@ -3208,7 +3209,7 @@ static void uct_ib_mlx5dv_check_dc(uct_ib_device_t *dev)

static uct_ib_md_ops_t uct_ib_mlx5_md_ops;

static ucs_status_t
static ucs_status_t
uct_ib_mlx5dv_check_ddp(struct ibv_context *ctx, uct_ib_mlx5_md_t *md)
{
#ifdef HAVE_OOO_RECV_WRS
Expand Down Expand Up @@ -3325,11 +3326,14 @@ static uct_ib_md_ops_t uct_ib_mlx5_md_ops = {
.super = {
.close = uct_ib_md_close,
.query = uct_ib_md_query,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = uct_ib_mem_advise,
.mem_reg = uct_ib_verbs_mem_reg,
.mem_dereg = uct_ib_verbs_mem_dereg,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_advise = uct_ib_mem_advise,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_ib_verbs_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
},
.open = uct_ib_mlx5dv_md_open,
Expand Down
5 changes: 3 additions & 2 deletions src/uct/ib/mlx5/gga/gga_mlx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,12 @@ static uct_md_ops_t uct_mlx5_gga_md_ops = {
.query = uct_ib_mlx5_gga_md_query,
.mem_alloc = uct_ib_mlx5_devx_device_mem_alloc,
.mem_free = uct_ib_mlx5_devx_device_mem_free,
.mem_advise = uct_ib_mem_advise,
.mem_reg = uct_ib_mlx5_devx_mem_reg,
.mem_dereg = uct_ib_mlx5_devx_mem_dereg,
.mem_attach = uct_ib_mlx5_devx_mem_attach,
.mem_advise = uct_ib_mem_advise,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_ib_mlx5_gga_mkey_pack,
.mem_attach = uct_ib_mlx5_devx_mem_attach,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
};

Expand Down
10 changes: 6 additions & 4 deletions src/uct/rocm/copy/rocm_copy_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,14 @@ static ucs_status_t uct_rocm_copy_mem_free(uct_md_h md, uct_mem_h memh)
static uct_md_ops_t md_ops = {
.close = uct_rocm_copy_md_close,
.query = uct_rocm_copy_md_query,
.mkey_pack = uct_rocm_copy_mkey_pack,
.mem_alloc = uct_rocm_copy_mem_alloc,
.mem_free = uct_rocm_copy_mem_free,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_rocm_copy_mem_reg,
.mem_dereg = uct_rocm_copy_mem_dereg,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = uct_rocm_base_mem_query,
.mkey_pack = uct_rocm_copy_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = uct_rocm_base_detect_memory_type,
};

Expand Down Expand Up @@ -342,11 +343,12 @@ static uct_md_ops_t md_rcache_ops = {
.query = uct_rocm_copy_md_query,
.mem_alloc = uct_rocm_copy_mem_alloc,
.mem_free = uct_rocm_copy_mem_free,
.mkey_pack = uct_rocm_copy_mkey_pack,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_rocm_copy_mem_rcache_reg,
.mem_dereg = uct_rocm_copy_mem_rcache_dereg,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = uct_rocm_base_mem_query,
.mkey_pack = uct_rocm_copy_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = uct_rocm_base_detect_memory_type,
};

Expand Down
7 changes: 5 additions & 2 deletions src/uct/rocm/ipc/rocm_ipc_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,14 @@ uct_rocm_ipc_md_open(uct_component_h component, const char *md_name,
static uct_md_ops_t md_ops = {
.close = (uct_md_close_func_t)ucs_empty_function,
.query = uct_rocm_ipc_md_query,
.mkey_pack = uct_rocm_ipc_mkey_pack,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_rocm_ipc_mem_reg,
.mem_dereg = uct_rocm_ipc_mem_dereg,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_rocm_ipc_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
};
static uct_md_t md = {
Expand Down
3 changes: 2 additions & 1 deletion src/uct/sm/mm/posix/mm_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,9 @@ static uct_mm_md_mapper_ops_t uct_posix_md_ops = {
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = (uct_md_mem_reg_func_t)ucs_empty_function_return_unsupported,
.mem_dereg = (uct_md_mem_dereg_func_t)ucs_empty_function_return_unsupported,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_posix_md_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
},
.query = uct_posix_query,
Expand Down
3 changes: 2 additions & 1 deletion src/uct/sm/mm/sysv/mm_sysv.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ static uct_mm_md_mapper_ops_t uct_sysv_md_ops = {
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = (uct_md_mem_reg_func_t)ucs_empty_function_return_unsupported,
.mem_dereg = (uct_md_mem_dereg_func_t)ucs_empty_function_return_unsupported,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_sysv_md_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
},
.query = uct_sysv_query,
Expand Down
3 changes: 2 additions & 1 deletion src/uct/sm/mm/xpmem/mm_xpmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,9 @@ static uct_mm_md_mapper_ops_t uct_xpmem_md_ops = {
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_xmpem_mem_reg,
.mem_dereg = uct_xmpem_mem_dereg,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_xpmem_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
},
.query = uct_xpmem_query,
Expand Down
2 changes: 2 additions & 0 deletions src/uct/sm/scopy/cma/cma_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ uct_cma_md_open(uct_component_t *component, const char *md_name,
.query = uct_cma_md_query,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = (uct_md_mem_reg_func_t)ucs_empty_function_return_unsupported,
.mem_dereg = (uct_md_mem_dereg_func_t)ucs_empty_function_return_unsupported,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_unsupported,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
Expand Down
6 changes: 5 additions & 1 deletion src/uct/sm/scopy/knem/knem_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,13 @@ static ucs_status_t uct_knem_rkey_release(uct_component_t *component,
static uct_md_ops_t md_ops = {
.close = uct_knem_md_close,
.query = uct_knem_md_query,
.mkey_pack = uct_knem_mkey_pack,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_knem_mem_reg,
.mem_dereg = uct_knem_mem_dereg,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = uct_knem_mkey_pack,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported,
};
Expand Down
6 changes: 5 additions & 1 deletion src/uct/sm/self/self.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,13 @@ static ucs_status_t uct_self_md_open(uct_component_t *component, const char *md_
static uct_md_ops_t md_ops = {
.close = (uct_md_close_func_t)ucs_empty_function,
.query = uct_self_md_query,
.mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_success,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_md_dummy_mem_reg,
.mem_dereg = uct_md_dummy_mem_dereg,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_success,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
};
Expand Down
5 changes: 5 additions & 0 deletions src/uct/tcp/tcp_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ static void uct_tcp_md_close(uct_md_h md)
static uct_md_ops_t uct_tcp_md_ops = {
.close = uct_tcp_md_close,
.query = uct_tcp_md_query,
.mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported,
.mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = (uct_md_mem_reg_func_t)ucs_empty_function_return_unsupported,
.mem_dereg = (uct_md_mem_dereg_func_t)ucs_empty_function_return_unsupported,
.mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported,
.mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_unsupported,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
};

Expand Down
5 changes: 3 additions & 2 deletions src/uct/ze/copy/ze_copy_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,12 @@ static uct_md_ops_t md_ops = {
.query = uct_ze_copy_md_query,
.mem_alloc = uct_ze_copy_mem_alloc,
.mem_free = uct_ze_copy_mem_free,
.mkey_pack = ucs_empty_function_return_success,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = uct_ze_copy_mem_reg,
.mem_dereg = ucs_empty_function_return_success,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.mem_query = uct_ze_copy_md_mem_query,
.mkey_pack = ucs_empty_function_return_success,
.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported,
.detect_memory_type = uct_ze_copy_md_detect_memory_type,
};

Expand Down

0 comments on commit 03d591c

Please sign in to comment.