Skip to content

Commit 75c2b30

Browse files
msluszniakSS-JIA
authored andcommitted
Vulkan: add the missing int32 -> uint8 view_convert variant
The view_convert combo lists generate uint8 -> int32 but not the reverse, so a graph containing an int32 -> uint8 view_convert lowers cleanly and then aborts at run time: Could not find ShaderInfo with name view_convert_buffer_int32_uint8 (ShaderRegistry.cpp:54, (it != listings_.end()) is false) The partitioner has no visibility into which dtype pairs were generated, so this surfaces as a crash on device rather than the node being left on host. sentence-transformers/all-MiniLM-L6-v2 hits it through its attention mask on any graph lowered with VulkanPartitioner. view_convert is a plain elementwise OUT_T(in) cast, so the pair needs nothing beyond being listed. Verified on a Galaxy S26 Ultra (Adreno 840): with this variant generated, all-MiniLM-L6-v2 runs and its embedding matches the eager reference to cosine 0.99999726 (max abs deviation 4.0e-04), bit-identical across 90 in-process replays.
1 parent b3b8c9a commit 75c2b30

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎backends/vulkan/runtime/graph/ops/glsl/view_convert_buffer.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ view_convert_buffer:
1818
- parameter_values: [uint8, float]
1919
- parameter_values: [uint8, half]
2020
- parameter_values: [uint8, int32]
21+
- parameter_values: [int32, uint8]
2122
- parameter_values: [float, int32]
2223
- parameter_values: [float, half]
2324
- parameter_values: [half, float]

‎backends/vulkan/runtime/graph/ops/glsl/view_convert_texture.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ view_convert_texture:
1818
- parameter_values: [uint8, float]
1919
- parameter_values: [uint8, half]
2020
- parameter_values: [uint8, int32]
21+
- parameter_values: [int32, uint8]
2122
- parameter_values: [float, int32]
2223
- parameter_values: [float, half]
2324
- parameter_values: [half, float]

0 commit comments

Comments
 (0)