-
Notifications
You must be signed in to change notification settings - Fork 427
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
UCT/API: Add new MD resource query API #10154
Changes from 3 commits
1e716b3
6ef27ff
3996cef
3706f4a
c2e1414
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 |
---|---|---|
|
@@ -1050,6 +1050,91 @@ int uct_iface_is_reachable_v2(uct_iface_h iface, | |
const uct_iface_is_reachable_params_t *params); | ||
|
||
|
||
/** | ||
* @ingroup UCT_RESOURCE | ||
* @brief Capability flags of @ref uct_tl_resource_desc_t. | ||
* | ||
* The enumeration defines bit mask of capabilities in @ref | ||
* uct_tl_resource_desc_v2_t::flags, set by @ref uct_md_query_tl_resources_v2. | ||
*/ | ||
typedef enum { | ||
/** | ||
* If set, the resource supports inter-node communications. | ||
*/ | ||
UCT_TL_RESOURCE_DESC_FLAG_INTER_NODE = UCS_BIT(0) | ||
} uct_md_query_tl_esources_flags_t; | ||
|
||
|
||
/** | ||
* @ingroup UCT_RESOURCE | ||
* @brief Parameters passed to @ref uct_md_query_tl_resources_v2. | ||
*/ | ||
typedef struct { | ||
/** | ||
* Mask of valid fields which must currently be set to zero. | ||
* Future fields not specified in this mask will be ignored. | ||
* Provides ABI compatibility with respect to adding new fields. | ||
*/ | ||
uint64_t field_mask; | ||
} uct_md_query_tl_resources_params_t; | ||
|
||
|
||
/** | ||
* @ingroup UCT_RESOURCE | ||
* @brief Communication resource descriptor. | ||
* | ||
* Resource descriptor of a standalone communication resource with extraneous | ||
* flags. | ||
*/ | ||
typedef struct uct_tl_resource_desc_v2 { | ||
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. how would we make this struct extendable without breaking ABI? 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. we can force highest alignment (or pack) and add version field first, currently expected to be zero? 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. fixed by returning it in |
||
/** | ||
* Main resource descriptor | ||
*/ | ||
uct_tl_resource_desc_t desc; | ||
rakhmets marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* Associated resource flags using bits from @ref | ||
* uct_md_query_tl_resources_flags_t. | ||
*/ | ||
uint64_t flags; | ||
} uct_tl_resource_desc_v2_t; | ||
|
||
|
||
/** | ||
* @ingroup UCT_RESOURCE | ||
* @brief Query for transport resources. | ||
* | ||
* This routine queries the @ref uct_md_h "memory domain" for communication | ||
* resources that are available for it. | ||
* | ||
* @param [in] md Handle to memory domain. | ||
* @param [inout] params Parameters as defined in @ref | ||
* uct_md_query_tl_resources_params_t. | ||
* @param [out] resources_p Filled with a pointer to an array of resource | ||
* descriptors. | ||
* @param [out] num_resources_p Filled with the number of resources in the array. | ||
* | ||
* @return Error code. | ||
*/ | ||
ucs_status_t | ||
uct_md_query_tl_resources_v2(uct_md_h md, | ||
uct_md_query_tl_resources_params_t *params, | ||
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. const? 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. are we sure we never need to output any field? |
||
uct_tl_resource_desc_v2_t **resources_p, | ||
unsigned *num_resources_p); | ||
|
||
|
||
/** | ||
* @ingroup UCT_RESOURCE | ||
* @brief Release the list of resources returned from @ref uct_md_query_tl_resources_v2. | ||
* | ||
* This routine releases the memory associated with the list of resources | ||
* allocated by @ref uct_md_query_tl_resources_v2. | ||
* | ||
* @param [in] resources Array of resource descriptors to release. | ||
*/ | ||
void uct_release_tl_resource_list_v2(uct_tl_resource_desc_v2_t *resources); | ||
brminich marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
/** | ||
* @ingroup UCT_RESOURCE | ||
* @brief Connect endpoint to a remote endpoint. | ||
|
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.
do we need to define bits for it?
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.
currently we have none, so we expect zero value.
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.
fixed added one bitfield for returning
resources
.