You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Handle exceptions on mutually exclusive handler operations (#4639)
Calling handler::set_specialization_constant after or before
calling handler::use_kernel_bundle should cause the latter
operation to throw a SYCL exception with error code
errc::invalid. These changes enforces this behavior.
This is achieved by introducing a handler_impl class that
holds the current submission state. These states help
detect the invalid operation order. Since adding the
implementation to the handler class would be an ABI break,
the handler_impl is inserted at the start of the extended
members upon construction of the handler. This should
be promoted in the next release that breaks ABI.
Additionally these changes moves the unit tests in
sycl/unittests/SYCL2020/SpecConstDefaultValues.cpp into
the more general specialization constant unit test file
sycl/unittests/SYCL2020/SpecializationConstant.cpp.
Three additional test cases are added to ensure the
exception behavior added with this PR.
Signed-off-by: Steffen Larsen <[email protected]>
0 commit comments