-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Remove default error code value in exception #1150
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
[SYCL] Remove default error code value in exception #1150
Conversation
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
} | ||
|
||
template <typename T, access::address_space Space> | ||
void store(multi_ptr<T, Space> dst, T &x) const { | ||
throw runtime_error("Subgroups are not supported on host device. "); | ||
throw runtime_error("Subgroups are not supported on host device. ", | ||
PI_INVALID_DEVICE); |
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 guess it is more like feature_not_supported("text", PI_INVALID_OPERATION)
, but I'm okay with this resolution for now
@s-kanaev ping |
…ption-default-param
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
…ption-default-param
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
…ption-default-param
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
@@ -264,7 +264,7 @@ Command *Scheduler::GraphBuilder::insertMemoryMove(MemObjRecord *Record, | |||
AllocaCmdSrc = (Record->MAllocaCommands.end() != It) ? *It : nullptr; | |||
} | |||
if (!AllocaCmdSrc) | |||
throw runtime_error("Cannot find buffer allocation"); | |||
throw runtime_error("Cannot find buffer allocation", PI_INVALID_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.
I don't think PI_INVALID_VALUE
is appropriate here, but this and some other exceptions here are internal errors and should probably be assertions instead. But this is outside the scope of this patch, so I'm fine with this resolution for now.
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.
just some nitpicking.
@@ -236,7 +236,8 @@ class SYCLMemObjT : public SYCLMemObjI { | |||
if (useHostPtr()) | |||
throw invalid_parameter_error( | |||
"Buffer constructor from a pair of iterator values does not support " | |||
"use_host_ptr property."); | |||
"use_host_ptr property.", | |||
PI_INVALID_OPERATION); |
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.
Do you think PI_INVALID_VALUE is not apt for a invalid_parameter_error.
You have used that in the above file pretty consistently.
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.
There is no requirement in spec on exception in this case.
Though, for sake of consistency I'd rather change the type of exception to a mere cl::sycl::runtime_error
.
Done.
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
…_accessor_refactor * origin/sycl: (38 commits) [SYCL] Fix device::get_devices() with a non-host device type (intel#1235) [SYCL][PI][CUDA] Implement kernel and kernel-group information queries (intel#1180) [SYCL] Remove default error code value in exception (intel#1150) [SYCL] Fix devicelib assert LIT test (intel#1245) [SYCL] Set aux-target-cpu for SYCL offload device compilation (intel#1225) [SYCL] Remove fabs and ceil from the list of unsupported math functions (intel#1217) [SYCL] Fix circular reference between events and queues (intel#1226) [CI][Doc] Use SSH to deploy GitHub Pages (intel#1232) [SYCL][CUDA][Test] Testing for use of CUDA primary context (intel#1174) [SYCL] allow underscore symbol in temporary directory name [SYCL] Reject zero length arrays (intel#1153) [SYCL] Fix static code analyzis concerns (intel#1189) [SYCL] Add more details about the -fintelfpga option (intel#1218) [SYCL][CUDA] Select only NVPTX64 device binaries (intel#1223) [SYCL] Reverse max work-group size order (intel#1177) [SYCL][Doc] Add GroupAlgorithms extension (intel#1079) [SYCL] Fix SYCL internal enumerators conflict with user defined macro (intel#1188) [SYCL][CUDA] Fixes context release and unnamed context scope (intel#1207) [SYCL][CUDA] Fix context creation property parsing [CUDA][PI] clang-format pi.h ...
…ctor_tests * origin/sycl: [SYCL] Fix device::get_devices() with a non-host device type (intel#1235) [SYCL][PI][CUDA] Implement kernel and kernel-group information queries (intel#1180) [SYCL] Remove default error code value in exception (intel#1150) [SYCL] Fix devicelib assert LIT test (intel#1245) [SYCL] Set aux-target-cpu for SYCL offload device compilation (intel#1225) [SYCL] Remove fabs and ceil from the list of unsupported math functions (intel#1217)
Signed-off-by: Sergey Kanaev sergey.kanaev@intel.com