-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UCX/RNDV: multirail - updated EP configuration #1981
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,8 @@ typedef struct ucp_context_config { | |
int use_mt_mutex; | ||
/** On-demand progress */ | ||
int adaptive_progress; | ||
/** Rendezvous multirail support */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. multilanes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you agree with multilanes instead of multi-rail? |
||
unsigned max_rndv_lanes; | ||
} ucp_context_config_t; | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,10 @@ static inline ucp_lane_index_t ucp_ep_get_wireup_msg_lane(ucp_ep_h ep) | |
return (lane == UCP_NULL_LANE) ? ucp_ep_get_am_lane(ep) : lane; | ||
} | ||
|
||
static inline ucp_lane_index_t ucp_ep_get_rndv_get_lane(ucp_ep_h ep) | ||
static inline ucp_lane_index_t ucp_ep_get_rndv_get_lane(ucp_ep_h ep, ucp_lane_index_t idx) | ||
{ | ||
ucs_assert(ucp_ep_config(ep)->key.rndv_lane != UCP_NULL_LANE); | ||
return ucp_ep_config(ep)->key.rndv_lane; | ||
ucs_assert(ucp_ep_config(ep)->key.rndv_lanes[idx] != UCP_NULL_LANE); | ||
return ucp_ep_config(ep)->key.rndv_lanes[idx]; | ||
} | ||
|
||
static inline ucp_lane_index_t ucp_ep_get_tag_lane(ucp_ep_h ep) | ||
|
@@ -44,9 +44,14 @@ static inline ucp_lane_index_t ucp_ep_get_tag_lane(ucp_ep_h ep) | |
return ucp_ep_config(ep)->key.tag_lane; | ||
} | ||
|
||
static inline int ucp_ep_is_rndv_lane_present(ucp_ep_h ep) | ||
static inline int ucp_ep_is_rndv_lane_present(ucp_ep_h ep, ucp_lane_index_t idx) | ||
{ | ||
return ucp_ep_config(ep)->key.rndv_lane != UCP_NULL_LANE; | ||
return ucp_ep_config(ep)->key.rndv_lanes[idx] != UCP_NULL_LANE; | ||
} | ||
|
||
static inline int ucp_ep_rndv_num_lanes(ucp_ep_h ep) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better use UCS_F_ALWAYS_INLINE There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all other funcs there are static inline |
||
{ | ||
return ucp_ep_config(ep)->key.num_rndv_lanes; | ||
} | ||
|
||
static inline int ucp_ep_is_tag_offload_enabled(ucp_ep_config_t *config) | ||
|
@@ -65,9 +70,9 @@ static inline uct_ep_h ucp_ep_get_am_uct_ep(ucp_ep_h ep) | |
return ep->uct_eps[ucp_ep_get_am_lane(ep)]; | ||
} | ||
|
||
static inline uct_ep_h ucp_ep_get_rndv_data_uct_ep(ucp_ep_h ep) | ||
static inline uct_ep_h ucp_ep_get_rndv_data_uct_ep(ucp_ep_h ep, ucp_lane_index_t idx) | ||
{ | ||
return ep->uct_eps[ucp_ep_get_rndv_get_lane(ep)]; | ||
return ep->uct_eps[ucp_ep_get_rndv_get_lane(ep, idx)]; | ||
} | ||
|
||
static inline uct_ep_h ucp_ep_get_tag_uct_ep(ucp_ep_h ep) | ||
|
@@ -120,9 +125,9 @@ static inline const uct_md_attr_t* ucp_ep_md_attr(ucp_ep_h ep, ucp_lane_index_t | |
return &context->tl_mds[ucp_ep_md_index(ep, lane)].attr; | ||
} | ||
|
||
static inline uint64_t ucp_ep_rndv_md_flags(ucp_ep_h ep) | ||
static inline uint64_t ucp_ep_rndv_md_flags(ucp_ep_h ep, ucp_lane_index_t idx) | ||
{ | ||
return ucp_ep_md_attr(ep, ucp_ep_get_rndv_get_lane(ep))->cap.flags; | ||
return ucp_ep_md_attr(ep, ucp_ep_get_rndv_get_lane(ep, idx))->cap.flags; | ||
} | ||
|
||
static inline const char* ucp_ep_peer_name(ucp_ep_h ep) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
#include "dt_iov.h" | ||
#include "dt_generic.h" | ||
|
||
#include <ucp/core/ucp_types.h> | ||
#include <uct/api/uct.h> | ||
#include <ucp/api/ucp.h> | ||
|
||
|
@@ -23,8 +24,8 @@ typedef struct ucp_dt_state { | |
size_t offset; /* Total offset in overall payload. */ | ||
union { | ||
struct { | ||
uct_mem_h memh; | ||
} contig; | ||
uct_mem_h memh; | ||
} contig[UCP_MAX_RNDV_LANES]; | ||
struct { | ||
size_t iov_offset; /* Offset in the IOV item */ | ||
size_t iovcnt_offset; /* The IOV item to start copy */ | ||
|
@@ -41,4 +42,26 @@ typedef struct ucp_dt_state { | |
size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, | ||
ucp_dt_state_t *state, size_t length); | ||
|
||
#endif | ||
static UCS_F_ALWAYS_INLINE void | ||
ucp_dt_clear_rndv_lanes(ucp_dt_state_t *state) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe it is worth not to mention RNDV, as the code is rather generic and is in dt.h There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. renamed |
||
{ | ||
int i; | ||
for (i = 0; i < UCP_MAX_RNDV_LANES; i++) { | ||
state->dt.contig[i].memh = UCT_MEM_HANDLE_NULL; | ||
} | ||
} | ||
|
||
static UCS_F_ALWAYS_INLINE int | ||
ucp_dt_is_empty_rndv_lane(ucp_dt_state_t *state, int idx) | ||
{ | ||
return state->dt.contig[idx].memh == UCT_MEM_HANDLE_NULL; | ||
} | ||
|
||
static UCS_F_ALWAYS_INLINE int | ||
ucp_dt_have_rndv_lanes(ucp_dt_state_t *state) | ||
{ | ||
return !ucp_dt_is_empty_rndv_lane(state, 0); | ||
} | ||
|
||
#endif /* UCP_DT_H_ */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we get rid of
multirail
word here as well?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multi-rail is still here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brminich @yosefe
"Set max rendezvous-get lane numbers"
will work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Maximal number of devices on which a rendezvous operation may be executed in parallel."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated