From add73634ac93866a33cd68fa368f62c7c8b33d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20S=C5=82uszniak?= Date: Sun, 30 Aug 2026 10:20:44 +0200 Subject: [PATCH] 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. --- backends/vulkan/runtime/graph/ops/glsl/view_convert_buffer.yaml | 1 + backends/vulkan/runtime/graph/ops/glsl/view_convert_texture.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/backends/vulkan/runtime/graph/ops/glsl/view_convert_buffer.yaml b/backends/vulkan/runtime/graph/ops/glsl/view_convert_buffer.yaml index 200d58e1217..a770d986fd5 100644 --- a/backends/vulkan/runtime/graph/ops/glsl/view_convert_buffer.yaml +++ b/backends/vulkan/runtime/graph/ops/glsl/view_convert_buffer.yaml @@ -18,6 +18,7 @@ view_convert_buffer: - parameter_values: [uint8, float] - parameter_values: [uint8, half] - parameter_values: [uint8, int32] + - parameter_values: [int32, uint8] - parameter_values: [float, int32] - parameter_values: [float, half] - parameter_values: [half, float] diff --git a/backends/vulkan/runtime/graph/ops/glsl/view_convert_texture.yaml b/backends/vulkan/runtime/graph/ops/glsl/view_convert_texture.yaml index 47e9c43ee24..227a18b6ccf 100644 --- a/backends/vulkan/runtime/graph/ops/glsl/view_convert_texture.yaml +++ b/backends/vulkan/runtime/graph/ops/glsl/view_convert_texture.yaml @@ -18,6 +18,7 @@ view_convert_texture: - parameter_values: [uint8, float] - parameter_values: [uint8, half] - parameter_values: [uint8, int32] + - parameter_values: [int32, uint8] - parameter_values: [float, int32] - parameter_values: [float, half] - parameter_values: [half, float]