ucx
ucx copied to clipboard
UCP: Copy memh flags from parent to child
What
UCP_MEMH_FLAG_IMPORTED was added in https://github.com/openucx/ucx/pull/8584, as the only memory handle flag. But this flag is only set in the memh parent, and never propagated to user memh. Despite that, flag is used on user memh:
ucp_am_params_check_memh(const ucp_request_param_t *param, uint32_t *flags_p)
{
...
if (ucs_unlikely(param->memh->flags & UCP_MEMH_FLAG_IMPORTED)) {
if (ENABLE_PARAMS_CHECK &&
ucs_unlikely(*flags_p & UCP_AM_SEND_FLAG_EAGER)) {
return UCS_ERR_INVALID_PARAM;
}
*flags_p |= UCP_AM_SEND_FLAG_RNDV;
}
I think this flag must copied from parent to child in ucp_memh_init_from_parent, so that we can distinguish whether user memh is attached to imported memory or not
@iyastreb can we add a unit test for it?
@iyastreb can we add a unit test for it?
Sure, good idea indeed!