-
Notifications
You must be signed in to change notification settings - Fork 223
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
Add SPIR-V backend - SPIR-V Translator cross validation #2569
Comments
@VyacheslavLevytskyy @svenvh @asudarsa please express your opinion about that |
I like both this way of thinking in general, and this suggestion in particular. SPIR-V Backend is a client of SPIRV-LLVM-Translator in a sense of reverse translation from SPIR-V to LLVM IR, so such step would help to define some guarantees. I'd expect a caveat at least in that SPIR-V Backend is an experimental backend at the moment, but this can be addressed with additional checks of the config in a style of |
Thanks @MrSidims. I am fully in support of this idea. There are two ways in which we can accomplish this. (1) Run llc/clang explicitly in the tests. or (2) Modify translator code to call llc (under an option) instead of spir-v writer logic. We are already looking at option 2, so we can complete that. I am ok with either approach though. |
I support the idea, great to see the SPIR-V backend progress! Some thoughts on how we go about implementing it:
|
In this repository we have
.cl
tests which are being compiled for spir target emitting LLVM IR, that will be translated to SPIR-V and backwards. The suggestion is to compile them for spirv target as well using SPIR-V backend and then translate it back to LLVM IR by the translator. It might be not in the spirit of unit tests for a single project, but we already have an external dependency on clang here and rely on its output, modifying our expectations from time to time depending on the changes there. Meanwhile such cross validation would add sanity checks improving quality of the both projects. WDYT?The text was updated successfully, but these errors were encountered: