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

Adapt to using SPIR-V support as an external library #2935

Merged

Conversation

thewilsonator
Copy link
Contributor

For use with https://github.com/KhronosGroup/SPIRV-LLVM-Translator now that I finally managed to get around to wrangling CMake, after breaking my backend upgrading LLVM.

I'll add a release for OSX soon for testing, but this is something we can potentially do for LDC releases when we ship with LLVM7.

CMakeLists.txt Outdated Show resolved Hide resolved
@thewilsonator
Copy link
Contributor Author

Fixed semicolons, fixed windows (good god I hate it).

@thewilsonator
Copy link
Contributor Author

I'll do a release of LLVM sometime this week.

@thewilsonator
Copy link
Contributor Author

Release done, heres hoping that travis config works.

@thewilsonator thewilsonator force-pushed the spirv-external-library branch 5 times, most recently from 1fbfa13 to 2785135 Compare January 8, 2019 11:18
@thewilsonator thewilsonator force-pushed the spirv-external-library branch 11 times, most recently from f86ff59 to 0f65071 Compare January 11, 2019 03:07
@thewilsonator
Copy link
Contributor Author

Finally it passes.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@thewilsonator
Copy link
Contributor Author

Thanks for the review.

CMakeLists.txt Outdated Show resolved Hide resolved
@kinke
Copy link
Member

kinke commented Jan 11, 2019

It'd be nice to include the translator as git submodule of our LLVM fork once we upgrade to v8. It should be as simple as adding the submodule in the right location (project subdir); if the llvm-spirv build target isn't included by default in all, the ninja command line in the CI scripts would need to be extended too.
Then the prebuilt LDC packages will finally feature experimental OpenCL support too (I'm not interested in proprietary CUDA at all).

@thewilsonator
Copy link
Contributor Author

if the llvm-spirv build target isn't included by default in all

I'm only doing some copying (all of ~3MB) for out-of-tree because I can't be bothered to figure out how to tell lit where the binary is. For in-tree, I'm pretty sure it would be.

@thewilsonator
Copy link
Contributor Author

This good to go now?

@JohanEngelen
Copy link
Member

lgtm

.travis.yml Outdated Show resolved Hide resolved
@thewilsonator thewilsonator merged commit f5ae831 into ldc-developers:master Jan 18, 2019
@TurkeyMan
Copy link

So this means that all releases of LDC will support SPIR-V output?

@thewilsonator
Copy link
Contributor Author

It means they can. When we transition to releases with LLVM 8 (I think we release with 6 atm, @kinke?) I assume it will be enabled.

@kinke
Copy link
Member

kinke commented Jan 23, 2019

We release with 7.0.1.

@p0nce
Copy link
Contributor

p0nce commented Oct 17, 2022

Wow thanks for this, I just discovered LDC could generate OpenCL friendly SPIR-V!

@thewilsonator
Copy link
Contributor Author

Pleasure, when we get around to releasing with LLVM 15/16 (depending on the maturity of the new SPIR-V backend) we will transition to using that.

@thewilsonator thewilsonator deleted the spirv-external-library branch October 17, 2022 21:49
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.

5 participants