Skip to content
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] Inline cl namespace to simplify SYCL API usage #974

Merged
merged 2 commits into from
Dec 26, 2019

Conversation

bader
Copy link
Contributor

@bader bader commented Dec 25, 2019

The inlining is enabled by default and make using SYCL API a little bit
easier.

In order to disable cl namespace inlining user should define
__SYCL_DISABLE_NAMESPACE_INLINE__ macro.

Signed-off-by: Alexey Bader <[email protected]>
The inlining is enabled by default and make using SYCL API a little bit
easier.

In order to disable cl namespace inlining user should define
__SYCL_DISABLE_NAMESPACE_INLINE__ macro.

Signed-off-by: Alexey Bader <[email protected]>
@bader
Copy link
Contributor Author

bader commented Dec 25, 2019

Alternative approach to #969.

@romanovvlad romanovvlad merged commit 67e4655 into intel:sycl Dec 26, 2019
@keryell
Copy link
Contributor

keryell commented Dec 26, 2019

I guess you should add a test to show it runs with ::sycl:: too.

@bader bader deleted the sycl-namespace-inline branch December 28, 2019 11:40
@bader
Copy link
Contributor Author

bader commented Dec 30, 2019

I guess you should add a test to show it runs with ::sycl:: too.

@keryell, added in #986.

Alexander-Johnston referenced this pull request in codeplaysoftware/sycl-for-cuda Feb 6, 2020
Synchronise the CUDA backend with the general SYCL changes from #974.

Signed-off-by: Andrea Bocci <[email protected]>
Alexander-Johnston referenced this pull request in codeplaysoftware/sycl-for-cuda Feb 11, 2020
Synchronise the CUDA backend with the general SYCL changes from #974.

Signed-off-by: Andrea Bocci <[email protected]>
Alexander-Johnston referenced this pull request in codeplaysoftware/sycl-for-cuda Feb 19, 2020
Synchronise the CUDA backend with the general SYCL changes from #974.

Signed-off-by: Andrea Bocci <[email protected]>
Alexander-Johnston referenced this pull request in codeplaysoftware/sycl-for-cuda Feb 21, 2020
Synchronise the CUDA backend with the general SYCL changes from #974.

Signed-off-by: Andrea Bocci <[email protected]>
Alexander-Johnston referenced this pull request in codeplaysoftware/sycl-for-cuda Feb 24, 2020
Synchronise the CUDA backend with the general SYCL changes from #974.

Signed-off-by: Andrea Bocci <[email protected]>
bader pushed a commit that referenced this pull request Feb 24, 2020
* [SYCL][LIBCLC] Additional libclc builtins to support SYCL work

Adds builtins to libclc to support the CUDA backend for SYCL.

Contributors
Alexander Johnston <[email protected]>
David Wood <[email protected]>
Victor Lomuller <[email protected]>

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] CMake and lit support for SYCL CUDA backend

Adds defines CMake and lit variables used for SYCL CUDA backend
development and test

Contributors
Alexander Johnston <[email protected]>
Bjoern Knafla <[email protected]>
Ruyman Reyes <[email protected]>

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] Local Accessor Support for CUDA

Provides the LocalAccessorToSharedMemory compiler pass required
for supporting SYCL local accessors in CUDA.

Contributors
Alexander Johnston <[email protected]>
David Wood <[email protected]>

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Change __spirv_BuiltIn.. to functions

Changes the following builtins to functions

__spirv_BuiltInGlobalSize
__spirv_BuiltInWorkgroupSize
__spirv_BuiltInNumWorkgroups
__spirv_BuiltInLocalInvocationId
__spirv_BuiltInWorkgroupId
__spirv_BuiltInGlobalOffset

Contributors
David Wood <[email protected]>

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Add SYCL CUDA support to clang driver

Adds CUDA support for sycl compilation in the clang driver

Contributors
Alexander Johnston <[email protected]>
David Wood <[email protected]>
Victor Lomuller <[email protected]>

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Initial Implementation of the CUDA backend

Contributors
Alan Forbes <[email protected]>
Alexander Johnston <[email protected]>
Bjoern Knafla <[email protected]>
Daniel Soutar <[email protected]>
David Wood <[email protected]>
Kumudha Narasimhan <[email protected]>
Mehdi Goli <[email protected]>
Przemek Malon <[email protected]>
Ruyman Reyes <[email protected]>
Stuart Adams <[email protected]>
Svetlozar Georgiev <[email protected]>
Steffen Larsen <[email protected]>
Victor Lomuller <[email protected]>

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] Update libclc install rules

Have libclc install clc-* and libspirv-* to lib and share

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Inline cl namespace to simplify SYCL API usage

Synchronise the CUDA backend with the general SYCL changes from #974.

Signed-off-by: Andrea Bocci <[email protected]>

* Added missing flags for device-side builtins

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Removing unnecessary tool from the tree

Acked-by: Victor Lomuller <[email protected]>
Signed-off-by: Ruyman <[email protected]>

* [SYCL][PI] Fix kernel group info parameter conversion

Signed-off-by: Steffen Larsen <[email protected]>

* [SYCL][CUDA] Refactor __SYCL_INLINE macro

Synchronise the CUDA backend with the general SYCL changes from #1121.

Signed-off-by: Andrea Bocci <[email protected]>

* [SYCL] Have default_selector consider SYCL_BE

Have the default_selector consider the env var SYCL_BE when rating
device scores to make choosing a backend easier.

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] Select GlobalPlugin based on SYCL_BE

Rather than choose the last found plugin as GlobalPlugin, select
it depending on the SYCL_BE env var.

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] Improve default device selection checks

Better checks for CUDA and OpenCL devices to match with SYCL_BE in the
default device selection, based on the platform version info.

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] Formatting update for device_selector.cpp

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] Changed CUDA unit tests to call through plugin

Signed-off-by: Steffen Larsen <[email protected]>

* [SYCL] Pass SYCL_BE=PI_OPENCL in check-sycl

To ensure that the check-sycl targets test OpenCL devices, pass
SYCL_BE=PI_OPENCL. This mirrors the check-sycl-cuda target which
passes SYCL_BE=PI_CUDA. Without this it is nondeterministic which
device is tested by check-sycl.

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Remove PI_CUDA specific details from clang

Removes PI_CUDA specific code paths and tests from clang, opting to
always enable them.

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Disable linear_id/opencl-interop.cpp for cuda

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Further fixes to CUDA device selection

Fix platform string comparison for CUDA platform detection.
Fix device info platform query so that it uses the device's plugin,
rather than the GlobalPlugin.

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Code style and cleanup to CUDA support

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL] Enable asserts in all buildbot builds

Signed-off-by: Alexander Johnston <[email protected]>

* [SYCL][CUDA] Minor test and build configuration

Fix minor test and build configuration issues introduced in the
development of the CUDA backend.

Signed-off-by: Alexander Johnston <[email protected]>

Co-authored-by: Andrea Bocci <[email protected]>
Co-authored-by: Ruyman <[email protected]>
Co-authored-by: Steffen Larsen <[email protected]>
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.

3 participants