-
Notifications
You must be signed in to change notification settings - Fork 246
Add infrastructure for SPV_KHR_float_controls extension #540
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 infrastructure for SPV_KHR_float_controls extension #540
Conversation
AlexeySachkov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests
lib/SPIRV/SPIRVWriter.cpp
Outdated
| case spv::ExecutionModeRoundingModeRTZ:{ | ||
| unsigned TargetWidth; | ||
| N.get(TargetWidth); | ||
| BF->addExecutionMode(BM->add(new SPIRVExecutionMode( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see corresponding changes for the SPIRVReader, which means that this execution mode is going to be lost during reverse translation: are there plans to add SPIR-V -> LLVM IR support for this extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind this commit is to introduce infrastructure, without any Reader/Writer part.
This particular change is also a part of infrastructure - before this piece of code will work, somebody has to add those Exec Modes to PreprocessMetadata.cpp
Until that, reader or writer will not even touch these exec modes: they just do not know from which structure in LLVM IR translate to ExecutionModeRoundingModeRTE, neither what to do with this mode in reader part.
|
The idea behind this patch is to separate introduction of SPV_KHR_float_controls extension from the particular implementation. |
But you have changed the writer part: it is now actually able to insert new decorations into SPIR-V file |
|
I added the test, and moved commit with capabilities check here |
AlexeySachkov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good to me except the test: right now it doesn't produce valid SPIR-V and it would be good to fix.
@svenvh, @AlexeySotkin, any feedback?
AlexeySachkov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
svenvh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Added support for `SPV_KHR_float_controls` extension to SPIR-V generator part Fixed not emitting required extensions for capabilities Change-Id: If71942c556fd0f315b3e6181bd1bc4e7552403e5
No description provided.