-
Notifications
You must be signed in to change notification settings - Fork 2.2k
SYCL support #914
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 support #914
Conversation
The core and some ext functions should work.
Fix typos and code style (space to tab).
@Groovounet |
When compiling a program with Intel LLVM SYCL compiler, the following error is shown. Is this expected ? Thanks. include/glm/detail/_vectorize.hpp:71:24: error: SYCL kernel cannot call through a function pointer |
@zjin-lcf
|
This reverts PR g-truc#914 which introduced a hacky way to replace all std namespace maths function calls with sycl namespace ones. Presumably the original intention was to use GLM functions in SYCL device code (e.g. on GPUs) and force it to use the maths implementations optimised for the target device. However, this has been very limited in scope since the start because GLM relies heavily on function pointers which are illegal to use inside SYCL device code. The hacky solution shadowing std namespace with glm::std is problematic in many ways. One was that it required re-introducing all std symbols used across GLM codebase back to glm::std. The list of these symbols is difficult to maintain over time without extensive CI testing and unsurprisingly it got broken. Any code just including (some of) GLM headers now no longer compiles with SYCL compilers even if GLM is only used on the host side (CPU code). Remove this hack to allow SYCL programs using GLM on the host side to compile. The original hack was tested against the ComputeCpp compiler which is now phased out in favour of Intel's DPC++. Remove also the mention of ComputeCpp from README. The statement about "any C++11 compiler" still covers the host code compilation with DPC++.
This reverts PR #914 which introduced a hacky way to replace all std namespace maths function calls with sycl namespace ones. Presumably the original intention was to use GLM functions in SYCL device code (e.g. on GPUs) and force it to use the maths implementations optimised for the target device. However, this has been very limited in scope since the start because GLM relies heavily on function pointers which are illegal to use inside SYCL device code. The hacky solution shadowing std namespace with glm::std is problematic in many ways. One was that it required re-introducing all std symbols used across GLM codebase back to glm::std. The list of these symbols is difficult to maintain over time without extensive CI testing and unsurprisingly it got broken. Any code just including (some of) GLM headers now no longer compiles with SYCL compilers even if GLM is only used on the host side (CPU code). Remove this hack to allow SYCL programs using GLM on the host side to compile. The original hack was tested against the ComputeCpp compiler which is now phased out in favour of Intel's DPC++. Remove also the mention of ComputeCpp from README. The statement about "any C++11 compiler" still covers the host code compilation with DPC++.
This reverts PR #914 which introduced a hacky way to replace all std namespace maths function calls with sycl namespace ones. Presumably the original intention was to use GLM functions in SYCL device code (e.g. on GPUs) and force it to use the maths implementations optimised for the target device. However, this has been very limited in scope since the start because GLM relies heavily on function pointers which are illegal to use inside SYCL device code. The hacky solution shadowing std namespace with glm::std is problematic in many ways. One was that it required re-introducing all std symbols used across GLM codebase back to glm::std. The list of these symbols is difficult to maintain over time without extensive CI testing and unsurprisingly it got broken. Any code just including (some of) GLM headers now no longer compiles with SYCL compilers even if GLM is only used on the host side (CPU code). Remove this hack to allow SYCL programs using GLM on the host side to compile. The original hack was tested against the ComputeCpp compiler which is now phased out in favour of Intel's DPC++. Remove also the mention of ComputeCpp from README. The statement about "any C++11 compiler" still covers the host code compilation with DPC++.
This reverts PR g-truc#914 which introduced a hacky way to replace all std namespace maths function calls with sycl namespace ones. Presumably the original intention was to use GLM functions in SYCL device code (e.g. on GPUs) and force it to use the maths implementations optimised for the target device. However, this has been very limited in scope since the start because GLM relies heavily on function pointers which are illegal to use inside SYCL device code. The hacky solution shadowing std namespace with glm::std is problematic in many ways. One was that it required re-introducing all std symbols used across GLM codebase back to glm::std. The list of these symbols is difficult to maintain over time without extensive CI testing and unsurprisingly it got broken. Any code just including (some of) GLM headers now no longer compiles with SYCL compilers even if GLM is only used on the host side (CPU code). Remove this hack to allow SYCL programs using GLM on the host side to compile. The original hack was tested against the ComputeCpp compiler which is now phased out in favour of Intel's DPC++. Remove also the mention of ComputeCpp from README. The statement about "any C++11 compiler" still covers the host code compilation with DPC++.
I added some modifications to be able to use glm inside SYCL's kernel.
https://www.khronos.org/sycl/:
The core and ext functions should work out-of-box as long as they don't use the SYCL kernel's limitations (RTTI, dynamic allocation, recursion, function pointer).