-
Notifications
You must be signed in to change notification settings - Fork 283
Fixing cudax::execution CUDA stream scheduler #6175
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
Changes from 10 commits
10257dc
2754a37
5f05d4c
95bf8fb
0879990
f130600
756642b
6176b44
982f48e
a6c97a8
af438e6
fab2af9
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 |
---|---|---|
|
@@ -177,17 +177,14 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT continues_on_t | |
_CCCL_API void __set_result(_Tag, _As&&... __as) noexcept | ||
{ | ||
using __tupl_t _CCCL_NODEBUG_ALIAS = ::cuda::std::__tuple<_Tag, decay_t<_As>...>; | ||
if constexpr (__nothrow_decay_copyable<_As...>) | ||
_CCCL_TRY | ||
{ | ||
__state_->__result_.template __emplace<__tupl_t>(_Tag{}, static_cast<_As&&>(__as)...); | ||
} | ||
else | ||
_CCCL_CATCH_ALL | ||
{ | ||
_CCCL_TRY | ||
{ | ||
__state_->__result_.template __emplace<__tupl_t>(_Tag{}, static_cast<_As&&>(__as)...); | ||
} | ||
_CCCL_CATCH_ALL | ||
// Avoid ODR-using this completion operation if this code path is not taken. | ||
if constexpr (!__nothrow_decay_copyable<_As...>) | ||
{ | ||
execution::set_error(static_cast<_Rcvr&&>(__state_->__rcvr_), ::std::current_exception()); | ||
} | ||
|
@@ -315,7 +312,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT continues_on_t | |
_CCCL_EXEC_CHECK_DISABLE | ||
template <class... _Env> | ||
[[nodiscard]] _CCCL_API constexpr auto query(get_domain_override_t, _Env&&...) const noexcept | ||
-> __call_result_t<get_completion_domain_t<set_value_t>, env_of_t<_Sndr>, _Env...> | ||
-> __completion_domain_of_t<set_value_t, _Sndr, __fwd_env_t<_Env>...> | ||
{ | ||
return {}; | ||
} | ||
|
@@ -382,6 +379,8 @@ public: | |
} | ||
}; | ||
|
||
////////////////////////////////////////////////////////////////////////////////////////// | ||
// continues_on sender | ||
template <class _Sch, class _Sndr> | ||
struct _CCCL_TYPE_VISIBILITY_DEFAULT continues_on_t::__sndr_t | ||
{ | ||
|
@@ -424,7 +423,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT continues_on_t::__sndr_t | |
return __attrs_t<_Sch, _Sndr>{this}; | ||
} | ||
|
||
_CCCL_NO_UNIQUE_ADDRESS continues_on_t __tag_; | ||
/*_CCCL_NO_UNIQUE_ADDRESS*/ continues_on_t __tag_; | ||
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. Eric explained that tests were failing without removing this macro. I'm treating this removal as a temporary phenomenon. There are other ways to get this effect, e.g., the "compressed pair" pattern that the reference implementation of mdspan classically used. 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. i need to track down the compiler bug, file it, and then selectively disable 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. @ericniebler The other option is to use a different programming technique that guarantees that empty members occupy zero bytes. A classic one is a "compressed pair" or "compressed tuple" for storing the members, that does not store empty members. 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. that's true. it will be important when this code is no longer experimental to have all the space optimizations before we lock in the 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. I want to note that I am on the verge of completely dropping any use of Its just a complete trainwreck in the waiting 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. @miscco wrote:
100% agree; as a language feature it means well, but in practice for us it's nothing but trouble. |
||
_Sch __sch_; | ||
_Sndr __sndr_; | ||
}; | ||
|
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 do not understand the consequences of this macro change.
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.
It changes the functions' attributes so that debuggers won't step over them. Otherwise it has no effect.
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.
@ericniebler You mean, it stops inlining. We do need to restore this at some point : - )
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 would like to keep these changes to the function attributes. i learned many things while stepping through the experimental
execution
code in cuda-gdb. it turns out i rarely want "nodebug" apis. i very occasionally want "trivial" (force-inline nodebug) apis, but most apis should just be_CCCL_API
.