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

Any chance to support spirv as a backend? #200

Open
warvstar opened this issue Oct 19, 2020 · 3 comments
Open

Any chance to support spirv as a backend? #200

warvstar opened this issue Oct 19, 2020 · 3 comments

Comments

@warvstar
Copy link

Is your feature request related to a problem? Please describe.
I'd like to use this in a hardware vendor agnostic way, and more specifically I'd like to use with webgpu. Any plans to support in the future? OpenCL subset can compile to spirv, so that could be another option?

@stotko
Copy link
Owner

stotko commented Oct 20, 2020

After taking a quick look at SPIR-V, I believe that it is not easily possible to add it as a backend. stdgpu requires C++14 (I guess it is possible to break it down to C++11 if absolutely needed). SPIR-V on the other hand is an intermediate format for GLSL, etc. which are based on C.

I guess OpenCL C++, i.e. version 2.x which is also based on a subset of C++14, might be possible. Support for an algorithms library is a requirement. At the moment, stdgpu depends on thrust for this purpose, but perhaps allowing to choose Boost.Compute here might be a good solution. However, implementing such an OpenCL backend requires more investigation.

@ipapadop
Copy link

SYCL (https://www.khronos.org/sycl/) may be an easier way to go about it. It's standard C++11 (SYCL 2020 released 6/2020 is based on C++17)

@stotko
Copy link
Owner

stotko commented Oct 20, 2020

Thanks for the suggestion. A SYCL backend also requires relaxing the dependency to thrust (or adding a SYCL backend to thrust which is more difficult I guess). Since there will be more breaking changes to stdgpu 2.0.0, we may target this as well to be part of the next major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants