Skip to content

LLM inference in C/C++

C++ ggml

vulkan: fix step operator for 0 input (#25036)

Ruben Ortlam0b6529d81860
diff --git a/ggml/src/ggml-vulkan/vulkan-shaders/unary.comp b/ggml/src/ggml-vulkan/vulkan-shaders/unary.comp
index c62bce8255..5ee5275d27 100644
--- a/ggml/src/ggml-vulkan/vulkan-shaders/unary.comp
+++ b/ggml/src/ggml-vulkan/vulkan-shaders/unary.comp
@@ -42,7 +42,7 @@ float op_leaky_relu(float x) {
}
float op_step(float x) {
- return x >= 0.0f ? 1.0f : 0.0f;
+ return x > 0.0f ? 1.0f : 0.0f;
}
float op_tanh(float x) {