diff --git a/config/m4/ucx.m4 b/config/m4/ucx.m4 index 35bb55f9bd..97fd547881 100644 --- a/config/m4/ucx.m4 +++ b/config/m4/ucx.m4 @@ -119,6 +119,11 @@ AS_IF([test "x$ucx_checked" != "xyes"],[ [], [#include ]) + AC_CHECK_MEMBER(ucs_rcache_ops_t.merge, + [AC_DEFINE([UCS_HAVE_RCACHE_MERGE_CB], [1], [flags for ucs_rcache_ops_t])], + [], + [#include ]) + AC_DEFINE([HAVE_UCX], 1, [Enable UCX support]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include diff --git a/src/components/tl/mlx5/mcast/tl_mlx5_mcast_rcache.c b/src/components/tl/mlx5/mcast/tl_mlx5_mcast_rcache.c index 47f73e485b..67d1202c4f 100644 --- a/src/components/tl/mlx5/mcast/tl_mlx5_mcast_rcache.c +++ b/src/components/tl/mlx5/mcast/tl_mlx5_mcast_rcache.c @@ -130,7 +130,10 @@ void ucc_tl_mlx5_mcast_mem_deregister(ucc_tl_mlx5_mcast_coll_context_t *ctx, static ucc_rcache_ops_t ucc_tl_mlx5_rcache_ops = { .mem_reg = ucc_tl_mlx5_mcast_rcache_mem_reg_cb, .mem_dereg = ucc_tl_mlx5_mcast_rcache_mem_dereg_cb, - .dump_region = ucc_tl_mlx5_mcast_rcache_dump_region_cb + .dump_region = ucc_tl_mlx5_mcast_rcache_dump_region_cb, +#ifdef UCS_HAVE_RCACHE_MERGE_CB + .merge = ucc_rcache_merge_cb_empty +#endif }; ucc_status_t ucc_tl_mlx5_mcast_setup_rcache(ucc_tl_mlx5_mcast_coll_context_t *ctx) diff --git a/src/components/tl/mlx5/tl_mlx5_rcache.c b/src/components/tl/mlx5/tl_mlx5_rcache.c index 630a882f92..a2d1f10acb 100644 --- a/src/components/tl/mlx5/tl_mlx5_rcache.c +++ b/src/components/tl/mlx5/tl_mlx5_rcache.c @@ -55,7 +55,10 @@ static void ucc_tl_mlx5_rcache_dump_region_cb(void *context, //NOLINT static ucc_rcache_ops_t ucc_tl_mlx5_rcache_ops = { .mem_reg = rcache_reg_mr, .mem_dereg = rcache_dereg_mr, - .dump_region = ucc_tl_mlx5_rcache_dump_region_cb + .dump_region = ucc_tl_mlx5_rcache_dump_region_cb, +#ifdef UCS_HAVE_RCACHE_MERGE_CB + .merge = ucc_rcache_merge_cb_empty +#endif }; ucc_status_t tl_mlx5_rcache_create(ucc_tl_mlx5_context_t *ctx) diff --git a/src/components/tl/sharp/tl_sharp_context.c b/src/components/tl/sharp/tl_sharp_context.c index 91a4ddab5e..4401f7651d 100644 --- a/src/components/tl/sharp/tl_sharp_context.c +++ b/src/components/tl/sharp/tl_sharp_context.c @@ -261,7 +261,10 @@ ucc_tl_sharp_rcache_dump_region_cb(void *context, ucs_rcache_t *rcache, //NOLINT static ucc_rcache_ops_t ucc_tl_sharp_rcache_ops = { .mem_reg = ucc_tl_sharp_rcache_mem_reg_cb, .mem_dereg = ucc_tl_sharp_rcache_mem_dereg_cb, - .dump_region = ucc_tl_sharp_rcache_dump_region_cb + .dump_region = ucc_tl_sharp_rcache_dump_region_cb, +#ifdef UCS_HAVE_RCACHE_MERGE_CB + .merge = ucc_rcache_merge_cb_empty +#endif }; ucc_status_t ucc_tl_sharp_rcache_create(struct sharp_coll_context *context, diff --git a/src/utils/ucc_rcache.h b/src/utils/ucc_rcache.h index 1995e11ba8..9d8e5830c3 100644 --- a/src/utils/ucc_rcache.h +++ b/src/utils/ucc_rcache.h @@ -35,6 +35,13 @@ static inline void ucc_rcache_set_default_params(ucs_rcache_params_t *rcache_par #define ucc_rcache_region_put ucs_rcache_region_put #define ucc_rcache_region_invalidate ucs_rcache_region_invalidate +static inline void +ucc_rcache_merge_cb_empty(void *context, ucs_rcache_t *rcache, + void *arg, ucs_rcache_region_t *region) +{ + return; +} + /* Wrapper functions for status conversion */ static inline ucc_status_t ucc_rcache_create(const ucc_rcache_params_t *params,