You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4888851
Browse filesBrowse the repository at this point in the historyBrowse files
[ET-VK] Modernize view op with indexing.glslh and consolidate dispatch
Pull Request resolved: pytorch#18451
Modernizes the view operator implementation:
Shader changes:
- Renames view.glsl to view_texture.glsl to follow the naming convention
for texture-path shaders
- Rewrites the shader to use indexing.glslh utilities and TextureMetadata
UBOs instead of the deprecated indexing_utils.h with push constant sizes
- Adds safe_idx() to indexing.glslh for Adreno 740-safe UBO ivec4 component
access via if/else chains instead of dynamic v[index]
C++ dispatch changes:
- Consolidates 4 separate add_*_node functions into 2:
add_view_copy_node (handles both buffer and texture) and
add_view_copy_convert_node (handles both buffer and texture)
- Each function conditionally builds kernel name, UBOs, and spec constants
before a single DynamicDispatchNode creation
- Uses graph.meta_ubo() to auto-select buffer vs texture UBO
- Updates all callers: Clone, Squeeze, Unsqueeze, ToCopy
ghstack-source-id: 357266949
@exported-using-ghexport
Differential Revision: [D97959284](https://our.internmc.facebook.com/intern/diff/D97959284/)
0 commit comments