Skip to content

[SYCL][COMPAT] Added device extension and manager #10774

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

Merged
merged 12 commits into from
Aug 22, 2023

Conversation

Alcpz
Copy link
Contributor

@Alcpz Alcpz commented Aug 10, 2023

This is the second PR implementation of SYCLcompat. SYCLcompat primary goals and features are documented here.

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_devicemember 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]>
@Alcpz Alcpz requested a review from a team as a code owner August 10, 2023 11:51
@Alcpz Alcpz requested a review from a team as a code owner August 10, 2023 15:49
@Alcpz Alcpz requested a review from bso-intel August 10, 2023 15:49
@Alcpz Alcpz force-pushed the Alcpz/syclcompat-device-ext branch 4 times, most recently from e3d16b2 to 7893c62 Compare August 15, 2023 13:21
- Test suite is now separated from the standard unittests.
- Syclcompat needs to run device code, thus they can't be run in the BUILD
+ LIT action.
- As they run Gtests, this is proposed following the sycl/test/Unit lit architecture.
This results in a different target to keep existing e2e tests separated
from syclcompat.

- Dependency of unittests from sycl to sycl-toolchain
@Alcpz Alcpz force-pushed the Alcpz/syclcompat-device-ext branch from 7893c62 to ad16a6e Compare August 15, 2023 13:30
Alcpz added 5 commits August 15, 2023 14:31
This commit reverts the changes introduced in intel#9976 to sycl/unittests.
It also removes the gtest suite from syclcompat

Rationale: We need device code to test the following syclcompat PRs.

Changes:
- Removed sycl/cmake/modules/AddSYCLLibraryUnittest.cmake as it was only
used here, this has also introduced overhead to people working in the
Unittests CI, it is better for them to remove the need to maintain this.
- Reverted syclcompat changes in sycl/unittests/CMakeLists.txt
- Refactored sycl/unittests/syclcompat to sycl/test-e2e/syclcompat
@Alcpz
Copy link
Contributor Author

Alcpz commented Aug 17, 2023

@bso-intel I think this PR is ready for review.
To give a bit of context, we introduced SYCLcompat as a stand-alone library outside of sycl in #9976, which was tested with unittests following advice from other reviewers (we used Gtests, and this simplified the workflow).
However, new functionality will require to run device code and It could be simpler to re-use the lit.

This PR reverts the changes to Cmake, as these files are not used anywhere else in the infrastructure that we are aware of, this should reduce some overhead we caused to the owners of the Unittesting CI actions, as we compiled through a different mechanism.

Thank you

Copy link
Contributor

@AerialMantis AerialMantis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few suggestions.

Alcpz and others added 2 commits August 21, 2023 11:08
- Added const variable: device name buffer size
(device_info::NAME_BUFFER_SIZE).
- get_major_version and get_minor_version calls follow the same
convention as the other get_ functions.
- Removed default handler when creating a queue with
`print_on_async_exceptions` set to false.
- device_fixt: .h -> .hpp
- Removed non-existing friend function free_async.
- Improved Readme.md with latest changes.
  - Fixed syclcompat include statement.
@Alcpz Alcpz force-pushed the Alcpz/syclcompat-device-ext branch from a93fd05 to 313c8ca Compare August 21, 2023 10:11
@Alcpz
Copy link
Contributor Author

Alcpz commented Aug 22, 2023

@intel/llvm-gatekeepers Is it ok to merge this PR?
The other member of @intel/syclcompat-lib-reviewers is currently unavailable, so we asked @AerialMantis to perform the review on their behalf.

@steffenlarsen
Copy link
Contributor

@intel/llvm-gatekeepers Is it ok to merge this PR? The other member of @intel/syclcompat-lib-reviewers is currently unavailable, so we asked @AerialMantis to perform the review on their behalf.

Keep in mind that not getting approval from all required groups means only a subset of gatekeepers can merge it. Thanks to @AerialMantis for standing in for the review!

@steffenlarsen steffenlarsen merged commit 465aa56 into intel:sycl Aug 22, 2023
@Alcpz Alcpz deleted the Alcpz/syclcompat-device-ext branch June 27, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants