This repository was archived by the owner on Aug 11, 2023. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 89
Example of synchronous error handling #163
Merged
DuncanMcBain merged 1 commit into codeplaysoftware:master from RossBrunton:ross/sync-err Dec 11, 2018
Merged
Example of synchronous error handling #163
DuncanMcBain merged 1 commit into codeplaysoftware:master from RossBrunton:ross/sync-err Dec 11, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.
Looking good!
ce33741 to b97e276 Compare cjdb reviewed Dec 11, 2018
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.
LGTM overall, a few comments. Please strongly consider my refactoring recommendations.
This example is specifically about a handler which fails to find a valid device. This should fix codeplaysoftware#105.
b97e276 to 3c4d87c Compare cjdb reviewed Dec 11, 2018
| using namespace cl::sycl; | ||
| | ||
| namespace { | ||
| class Worker; |
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.
This is a declaration. IIRC we need this to be a definition (cc @Ruyk).
mehdi-goli pushed a commit to mehdi-goli/computecpp-sdk that referenced this pull request Dec 12, 2018
* Add explicit tests option to CMakeLists.txt This option has existed for some time, but was never explicitly written in the main CMake file. While adding this, some old unused lines were removed from the CMake (the directory has long not been set by FindComputeCpp.cmake, so the lines were totally useless). * This commit removes the unnessasary usage of the buffer allocator in virtual pointer. * Add check so `end` iterator is not dereferenced (codeplaysoftware#150) The current behaviour of `get_node` in the virtual pointer mapper will use `lower_bound` to get the buffer which is not less than the input pointer. If the pointer mapper has only allocated one buffer, and we are looking up a pointer offset into that buffer then the call to `lower_bound` will return an iterator pointing past the end of the map. This means we cannot dereference this iterator, as it does not point into the map, but we still want to decrement this iterator to get the buffer that the virtual pointer is referencing. By adding a check for whether the iterator is the end we can short circuit the iterator dereference, and so avoid this problem without otherwise changing the behaviour of the pointer mapper. * Fix type shadowing (codeplaysoftware#152) The type buffer_t is defined in the class PointerMapper and redefined to a different type in get_buffer which results in shadowing warnings. SYCLmalloc doesn't have this issue but the alias should probably be changed for consistency. * Add property_list parameter to syclmalloc (codeplaysoftware#157) Property lists are useful, and we still want to pass them to buffers through the SYCL malloc interface. In addition, a related test was failing because of an interface change, and has been removed. * Improve portability of FindComputeCpp.cmake Contains improvements designed to improve the reliablity of FindComputeCpp.cmake, brought on by the MSVC policy of supporting only two Clang versions at any given time. * Added way to check MSVC STL/Clang compatibility * Fix and simplify force-include for MSVC * Ensure device compiler arguments are always stored as CMake list * Added initial example of builtin kernel Small sample showing how to use built-in kernels in ComputeCpp. * Warn when computecpp_info can't be found Fixes issue codeplaysoftware#126 but allows for optional ComputeCpp use. * Add synchronous error handling sample (codeplaysoftware#163) Specifically this shows a device selector that fails to find a device. Similar effect could be achieved with the fallback queue. This should fix codeplaysoftware#105. * Move compiler checks to separate module (codeplaysoftware#160) Moving these compiler checks to a separate module keeps the main FindComputeCpp.cmake clean and makes the checks "opt-in", if you know that you won't need the check for your project. * Changes to the tiled-convolution branch * Use `handler::copy` instead of copying in kernel * Initialize output data to zero * Only create single temporary buffer object * Use on-chip memory for temporary buffer objects * Made `compute_index` a single function * Added existing sample from master * As `tiled-convolution-standard` * `input_data_info` * Changed OpenCL parameters * Addressed many PR comments * `constexpr matrix_size_t` * Typo fixes and formatting * Validate returns `bool` * No need to specifiy global buffer target * CMake cleanup * Display profiling
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
This example is specifically about a handler which fails to find a valid
device.
This should fix #105.
Once again, let me know if I'm not writing my code "sycl-y" enough, or you want another example with the CL context thing.