Skip to content

Commit 465aa56

Browse files
AlcpzAerialMantisjoeatoddPietroGhgRuyk
authored
[SYCL][COMPAT] Added device extension and manager (#10774)
This is the second PR implementation of SYCLcompat. SYCLcompat primary goals and features are documented [here](https://github.com/intel/llvm/tree/sycl/sycl/doc/syclcompat). The PR includes the code that would implement the wrapper to expose the management of the `sycl::device`, `sycl::queue`, and `sycl::context`. The exposed functionalities include: - Creation and destruction of queues, and providing the ability to wait for submitted kernels. - Any async errors will be output to stderr if `print_on_async_exceptions`. Synchronous exceptions have to be managed by users independently of what is set in this parameter. - Management of multiple devices. The library uses the default SYCL device (`sycl::default_selector_v`) as the default device, and exposes all other devices available on the system through the `syclcompat::select_device`member function. We are open to any suggestions, concerns, or improvements you may have, so please, let us know if you have any. --------- Co-authored-by: Gordon Brown <[email protected]> Co-authored-by: Joe Todd <[email protected]> Co-authored-by: Pietro Ghiglio <[email protected]> Co-authored-by: Ruyman Reyes <[email protected]>
1 parent 6197bbe commit 465aa56

File tree

13 files changed

+1009
-259
lines changed

13 files changed

+1009
-259
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ install(DIRECTORY "${sycl_inc_dir}/sycl" DESTINATION ${SYCL_INCLUDE_DIR} COMPONE
257257
install(DIRECTORY "${sycl_inc_dir}/CL" DESTINATION ${SYCL_INCLUDE_DIR}/sycl COMPONENT sycl-headers)
258258
install(DIRECTORY "${sycl_inc_dir}/std" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
259259
install(DIRECTORY ${BOOST_MP11_DESTINATION_DIR} DESTINATION ${SYCL_INCLUDE_DIR}/sycl/detail COMPONENT boost_mp11-headers)
260-
install(DIRECTORY "${sycl_inc_dir}/syclcompat" DESTINATION ${SYCL_INCLUDE_DIR}/syclcompat COMPONENT sycl-headers)
260+
install(DIRECTORY "${sycl_inc_dir}/syclcompat" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
261261
install(FILES "${sycl_inc_dir}/syclcompat.hpp" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
262262

263263
if (WIN32)

sycl/cmake/modules/AddSYCLLibraryUnitTest.cmake

Lines changed: 0 additions & 99 deletions
This file was deleted.

sycl/doc/syclcompat/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ through the main header, `syclcompat.hpp`. Note that `syclcompat.hpp` does not
5050
import the <sycl/sycl.hpp> header.
5151

5252
``` cpp
53-
#include <sycl/syclcompat.hpp>
53+
#include <syclcompat.hpp>
5454
```
5555

5656
This document presents the public API under the [Features](#features) section,
@@ -768,8 +768,8 @@ The exposed functionalities include creation and destruction of queues, through
768768
`syclcompat::create_queue` and `syclcompat::destroy_queue`, and providing the
769769
ability to wait for submitted kernels using `syclcompat::wait` or
770770
`syclcompat::wait_and_throw`. Any async errors will be output to `stderr` if
771-
`print_on_async_exceptions`. Synchronous exceptions have to be managed by users
772-
independently of what is set in this parameter.
771+
`print_on_async_exceptions`, and will have the default behavior otherwise, which calls `std:terminate`. Synchronous exceptions have to be managed
772+
by users independently of what is set in this parameter.
773773
774774
Devices are managed through a helper class, `device_ext`. The `device_ext` class
775775
associates a vector of `sycl::queues` with its `sycl::device`. The `device_ext`
@@ -1159,7 +1159,7 @@ using this library:
11591159
#include <cassert>
11601160
#include <iostream>
11611161
1162-
#include <sycl/syclcompat.hpp>
1162+
#include <syclcompat.hpp>
11631163
#include <sycl/sycl.hpp>
11641164
11651165
/**

0 commit comments

Comments
 (0)