Skip to content

Commit bbc0560

Browse files
committed
Exception was removed from empty cg
Signed-off-by: mdimakov <[email protected]>
1 parent f3ba4de commit bbc0560

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@
4040
#define __SYCL_NONCONST_FUNCTOR__
4141
#endif
4242

43-
#if SYCL_LANGUAGE_VERSION
44-
#define __SYCL_STD_VERSION__ SYCL_LANGUAGE_VERSION
45-
#else
46-
#define __SYCL_STD_VERSION__ 201707
47-
#endif
48-
49-
enum Sycl_std_versions {
50-
version_older_2020,
51-
version_2020
52-
};
53-
extern Sycl_std_versions sycl_ver;
54-
5543
template <typename DataT, int Dimensions, cl::sycl::access::mode AccessMode,
5644
cl::sycl::access::target AccessTarget,
5745
cl::sycl::access::placeholder IsPlaceholder>

sycl/source/handler.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include <detail/queue_impl.hpp>
2121
#include <detail/scheduler/scheduler.hpp>
2222

23-
Sycl_std_versions sycl_ver;
24-
2523
__SYCL_INLINE_NAMESPACE(cl) {
2624
namespace sycl {
2725

@@ -204,10 +202,10 @@ event handler::finalize() {
204202
std::move(MRequirements), std::move(MEvents), MCGType, MCodeLoc));
205203
break;
206204
case detail::CG::NONE:
207-
if (sycl_ver == version_older_2020)
208-
throw runtime_error("Command group submitted without a kernel or a "
209-
"explicit memory operation.",
210-
PI_INVALID_OPERATION);
205+
if (detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_ALL)) {
206+
std::cout << "The empty command group is supported by sycl2020"
207+
<< std::endl;
208+
}
211209
break;
212210
}
213211

@@ -219,7 +217,7 @@ event handler::finalize() {
219217
"Internal Error. Command group cannot be constructed.",
220218
PI_INVALID_OPERATION);
221219
else
222-
// if no runtime error was throws it is empty cg from sycl2020
220+
// empty cg is supported by sycl2020
223221
Event = std::make_shared<cl::sycl::detail::event_impl>();
224222
}
225223
else

0 commit comments

Comments
 (0)