Skip to content

Commit 6c5b307

Browse files
authored
UCP/RKEY: Sender flush if memory sys_dev is not remote lane sys_dev (openucx#10931)
1 parent 1537aa9 commit 6c5b307

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/ucp/proto/proto_multi.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,14 @@ ucp_proto_multi_select_bw_lanes(const ucp_proto_init_params_t *params,
144144
static ucp_sys_dev_map_t ucp_proto_multi_init_flush_sys_dev_mask(
145145
const ucp_proto_multi_init_params_t *params, ucp_lane_index_t lane)
146146
{
147-
const ucp_rkey_config_key_t *key = params->super.super.rkey_config_key;
148-
const uct_iface_attr_t *iface_attr =
149-
ucp_proto_common_get_iface_attr(&params->super.super, lane);
147+
const ucp_rkey_config_key_t *key = params->super.super.rkey_config_key;
148+
ucs_sys_device_t dst_sys_dev =
149+
params->super.super.ep_config_key->lanes[lane].dst_sys_dev;
150150

151+
/* Flush needed when remote lane sys_dev is not the final memory sys_dev */
151152
if ((key == NULL) || !ucp_rkey_need_remote_flush(key) ||
152-
!(iface_attr->cap.flags & UCT_IFACE_FLAG_GET_BCOPY) ||
153-
!ucp_proto_common_is_net_dev(&params->super.super, lane)) {
153+
(dst_sys_dev == UCS_SYS_DEVICE_ID_UNKNOWN) ||
154+
(dst_sys_dev == key->sys_dev)) {
154155
return 0;
155156
}
156157

0 commit comments

Comments
 (0)