-
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
UCT/API: Add uct_rkey_compare() function #9297
Conversation
src/uct/api/uct.h
Outdated
/** | ||
* Register the memory region so its remote access key would likely be | ||
* equal to remote access keys received from other peers, when compared | ||
* with @ref uct_rkey_compare. This flag is best-effort. When remote access |
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.
I'd suggest the following to solve docs build problem
* with @ref uct_rkey_compare. This flag is best-effort. When remote access | |
* with @a uct_rkey_compare. This flag is best-effort. When remote access |
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
src/uct/api/uct.h
Outdated
* with @a uct_rkey_compare. This flag is a best-effort hint. When remote | ||
* access keys received from different peers are compared equal, they can | ||
* be used interchangeably, avoiding the need to keep all of them in | ||
* memory. |
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.
All the comment for UCP API are applicable 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.
fixed
src/uct/api/v2/uct_v2.h
Outdated
/** | ||
* @ingroup UCT_MD | ||
* | ||
* @brief Compare two remote keys |
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.
this is not a sentence
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.
replaced by This routine compares two remote keys.
src/uct/api/v2/uct_v2.h
Outdated
* semantic is arbitrary and implementation dependent, nevertheless it's | ||
* guaranteed to be consistent (transitive and antisymmetric). It can be used, | ||
* for example, to perform an efficient binary search in a sorted array of | ||
* remote keys. |
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.
the same comments as in UCP code review
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.
replaced by shorter paragraph.
src/uct/api/v2/uct_v2.h
Outdated
* @param[in] params Additional parameters for comparison | ||
* @param[out] result Result of the comparison | ||
* | ||
* @return Error code or UCS_OK if result contains the comparison result |
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.
What UCP will do if error returned ? What does unsupported means ?
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.
The proposal is to have UCP immediately return that error.
The unsupported below is to be replaced by actual implementation after this PR is merged.
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.
what UCP will return if underlaying layer reports unsuported
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.
please check UCP side response: #9289 (comment)
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.
please see above comments
src/uct/api/v2/uct_v2.h
Outdated
* @brief This routine compares two remote keys. | ||
* | ||
* It sets the @a result argument to < 0 if rkey1 is lower than rkey2, 0 if they | ||
* are equal or > 0 if rkey1 is greater than rkey2. It can be used for sorting. |
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.
E.g. the result value can be used for sorting remote keys
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
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.
pls squash
e0ca269
to
4fc943a
Compare
4fc943a
to
e0ca269
Compare
e0ca269
to
3bea09d
Compare
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.
@tvegas1 next time pls use a merge commit instead of force-push
What
Add
uct_rkey_compare()
API, relates to #9289.Why ?
We need to compare remote keys to deduplicate received remote keys, > 0, = 0 or < 0.
How ?
Usage: