-
Notifications
You must be signed in to change notification settings - Fork 533
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
opt: add Int16 and Float16 to capability trim pass #5519
Conversation
Add support for Int16 and Float16 trim. Signed-off-by: Nathan Gauër <brioche@google.com>
If I remember correctly, the |
Float16 is provided by an extension? I see the vulkan extension, but not a SPIR-V one adding this. Isn't that core SPV 1.0? For extensions: the pass supports trimming extensions. This is done using the grammar. If no operand/opcode requires an extension, it is marked as non-required, and trimmed. |
Hm, I was thinking of |
The docs incorrectly stated that the `SPV_AMD_gpu_shader_half_float` extension was added when half types were used. This is now corrected to show that the Float16 capability is added instead. The remaining code that could have added that extension in certain cases has been dead code since microsoft#2503 since none of the instructions checked in that list are ones that are emitted by DXC, so it is removed to clean up. Follow up from KhronosGroup/SPIRV-Tools#5519
The docs incorrectly stated that the `SPV_AMD_gpu_shader_half_float` extension was added when half types were used. This is now corrected to show that the Float16 capability is added instead. The remaining code that could have added that extension in certain cases has been dead code since microsoft#2503 since none of the instructions checked in that list are ones that are emitted by DXC, so it is removed to clean up. Follow up from KhronosGroup/SPIRV-Tools#5519
The docs were out of date stating that the `SPV_AMD_gpu_shader_half_float` extension was added when half types were used. This is now corrected to show that the Float16 capability is added and no extension. The remaining code that could have added that extension in certain cases has been dead code since #2503 since none of the instructions checked in that list are ones that are emitted by DXC, so it is removed to clean up. Evidence that this is dead code: 1. `git grep "InterpolateAt"` finds no uses other than those removed here. 2. All tests still pass when it's removed. 3. The comments in #2503 also say they were not able to find a mapping from any HLSL intrinsics to these instructions, which is why no tests were added. Follow-up from: KhronosGroup/SPIRV-Tools#5519
Add support for Int16 and Float16 trim.
Fixes #5464