LLM inference in C/C++
C++ ggml
ci: fix Models Backend webgpu by supporting GGML_OP_DUP (#30216)
Pascale94acad853c0
diff --git a/ggml/src/ggml-webgpu/ggml-webgpu.cpp b/ggml/src/ggml-webgpu/ggml-webgpu.cppindex 11a4fc46fe..b14a1fe2b0 100644--- a/ggml/src/ggml-webgpu/ggml-webgpu.cpp+++ b/ggml/src/ggml-webgpu/ggml-webgpu.cpp@@ -3356,6 +3356,7 @@ static std::optional<webgpu_encoded_op> ggml_webgpu_encode(webgpu_context ctx,case GGML_OP_TRANSPOSE:case GGML_OP_RESHAPE:return std::nullopt;+ case GGML_OP_DUP:case GGML_OP_CPY:case GGML_OP_CONT:return ggml_webgpu_cpy(ctx, src0, node);@@ -4419,6 +4420,7 @@ static bool ggml_backend_webgpu_device_supports_op(ggml_backend_dev_t dev, constsupports_op = (src0->type == GGML_TYPE_F32 || src0->type == GGML_TYPE_F16 || src0->type == GGML_TYPE_I32 ||src0->type == GGML_TYPE_I16);break;+ case GGML_OP_DUP:case GGML_OP_CPY:case GGML_OP_CONT:supports_op = (op->type == GGML_TYPE_F16 || op->type == GGML_TYPE_F32 || op->type == GGML_TYPE_I32) &&