pytorch
67d401d1 - [Vulkan] Enable Codegen ShaderInfo Registry from GLSL files (conv2d) (#91915)

Commit
2 years ago
[Vulkan] Enable Codegen ShaderInfo Registry from GLSL files (conv2d) (#91915) @bypass-github-export-checks This diff allows for adding entries to the shader registry by specifying which op names and registry keys should map to a Shader in the Shader's glsl file. This can be done by adding a REGISTER_FOR line with a tuple of (op name, list of registry keys) to the ShaderInfo comment in the glsl file Ex. ``` REGISTER_FOR = ('conv2d', ['catchall', ...]) ``` This diff also registers the conv2d Shader under ```'conv2d → 'catchall'``` in the registry and uses ```VK_REGISTRY_KERNEL``` to retrieve the shader by look up in the registry The shader registry generated in spv.cpp now looks like ``` ShaderRegistry shader_registry = { {"conv2d", {{"catchall", "conv2d"}}}}; ``` Differential Revision: [D42197400](https://our.internmc.facebook.com/intern/diff/D42197400/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/91915 Approved by: https://github.com/mcr229
Author
Committer
Parents
Loading