-
Notifications
You must be signed in to change notification settings - Fork 208
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
handling extensions and spirv versions #110
Comments
I would also like to understand general architecture and strategy i.e. currently Clang accepts all vendor extensions under SPIR. Does it mean we will require translator to support all too? Or should it at least give an error if it encounter unknown extension? |
I think we cannot accept all accept vendor extensions - we can only support vendor extensions that are known to translator: in general, vendor extension might introduce different kind of entities in LLVM IR which cannot be translated as-is to SPIR-V: for example, new types. So, I would vote for emitting errors if unknown extension was encountered. Selecting supported extensions is tightly related to selecting SPIR-V version, because there are extensions that were included into core functionality by the newer spec versions. My vision of this mechanism is based on the following ideas:
SPIR-V versionIf no additional options was passed to translator - what should we do? Possible options:
New command line options:
SPIR-V extensionsIf no additional options was specified:
For SPIR-V consumption step |
I guess this can be considered as implemented for now and closed - at least basic infrastructure has landed. It provides possibility to specify max allowed SPIR-V version and allows to explicitly enable/disable SPIR-V extensions. New functionality covers both Documentation can be found here. I think I will open another one issue as follow-up from #244: add possibility to specify minimum allowed SPIR-V version: @tremmelg pointed out that there are use-cases for such option:
|
I haven't dug too deeply on this yet, but I was wondering what would the plan be for handling SPIR-V extensions.
Say we added a new CL SPIR-V extension for a new instruction and I wanted to generate it or we wanted to generate SPIR-V compatible with spirv 1.1 or 1.3 etc.
wrt triples would this need to be encoded in the triple?
Apologies if this is a bit vague :-)
The text was updated successfully, but these errors were encountered: