-
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: remove redundant UCT_CB_FLAG_SYNC #2938
Conversation
Test PASSed. |
Test PASSed. |
@hjelmn FYI |
Yeah, was wondering about that. Seemed odd to have both. |
UCT_IFACE_FLAG_CB_SYNC flag is set), | ||
the callback may be invoked only from | ||
the context that called @ref | ||
uct_iface_progress). */ | ||
}; |
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.
Its probably a bad idea to change the UCS_BIT of the async flag. Can break code that is using UCT. Probably better off just blocking out UCS_BIT(1) for awhile and leaving async as UCS_BIT(2).
@hjelmn technically it breaks backward compatibility. But if you are not concerned about this, I'm not supper worried. |
@shamisp I am not too concerned about it. Just concerned at the possibility that UCS_BIT(1) gets redefined at some point to something I don't want. Though I don't use ASYNC right now so I guess just protecting myself by checking for existence of the sync flag in btl/uct is enough. Linking should be protected by a new .so version for libuct.so. |
@shamisp why it's better than UCS_BIT(0) which was not used as well? may be rename UCS_BIT(1) and UCS_BIT(2) to UCT_CB_FLAG_DEPRECATED_XXX until lib version is bumped? |
@evgeny-leksikov Just doesn't make as much sense to change the value of the async flag. Then could also block out the old sync flag until the so is bumped. That would make sense to me. |
@hjelmn - agreed. This essentially was my intend. |
So, just to clarify:
|
@evgeny-leksikov Yes. That would be the safest approach. But do both the block and error return to be safe. |
Test PASSed. |
Test FAILed. |
bot:mlx:retest |
src/uct/api/uct.h
Outdated
which only supports sync callback | ||
(i.e., only the @ref UCT_IFACE_FLAG_CB_SYNC flag is set), | ||
it will behave exactly like a sync callback. */ | ||
UCT_CB_FLAG_DEPRECATED = UCS_BIT(1), /**< Deprecated 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.
UCT_CB_FLAG_RESERVED /* reserved for future use */
src/uct/api/uct.h
Outdated
(i.e., only the @ref UCT_IFACE_FLAG_CB_SYNC flag is set), | ||
it will behave exactly like a sync callback. */ | ||
UCT_CB_FLAG_DEPRECATED = UCS_BIT(1), /**< Deprecated value. */ | ||
UCT_CB_FLAG_ASYNC = UCS_BIT(2) /**< Callback may be invoked from any |
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 indent on column
src/uct/base/uct_iface.c
Outdated
status = uct_iface_query(tl_iface, &attr); | ||
if (status != UCS_OK) { | ||
return status; | ||
} | ||
|
||
if (flags & UCT_CB_FLAG_DEPRECATED) { | ||
ucs_error("Deprecated flags 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.
"Unsupported callback flag 0x%x"
src/uct/base/uct_iface.c
Outdated
@@ -412,6 +412,10 @@ UCS_CLASS_INIT_FUNC(uct_base_iface_t, uct_iface_ops_t *ops, uct_md_h md, | |||
|
|||
UCS_CLASS_CALL_SUPER_INIT(uct_iface_t, ops); | |||
|
|||
if (params->err_handler_flags & UCT_CB_FLAG_DEPRECATED) { | |||
return UCS_ERR_INVALID_PARAM; |
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.
"Unsupported callback flag 0x%x"
maybe wrap this in a macro to avoid code duplication with am_handler flags check
Test FAILed. |
Test FAILed. |
Test PASSed. |
Test FAILed. |
caf4e68
to
a86036f
Compare
Test FAILed. |
Test PASSed. |
Test FAILed. |
👍 |
Not related failures should be fixed by #2958 |
Test FAILed. |
timed out |
Test FAILed. |
#2958 |
Test FAILed. |
bot:mlx:retest |
Test FAILed. |
bot:mlx:retest |
Test FAILed. |
bot:mlx:retest |
Test PASSed. |
good to go? |
What
Remove redundant UCT_CB_FLAG_SYNC
Why ?
Flags UCT_CB_FLAG_SYNC and UCT_CB_FLAG_ASYNC are mutually exclusive