From: Daniel Bevenius Date: Mon, 1 Sep 2025 12:28:49 +0000 (+0200) Subject: ggml : WebGPU add TRANSPOSE and RESHAPE to supported ops (#15695) X-Git-Tag: upstream/0.0.6527~184 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=77dee9de97be75b7143a213bc48893e0c0b29af7;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml : WebGPU add TRANSPOSE and RESHAPE to supported ops (#15695) * ggml : WebGPU add TRANSPOSE and RESHAPE to supported ops This commit adds support for the TRANSPOSE and RESHAPE operations in the ggml webgpu backend. Co-authored-by: Diego Devesa Co-authored-by: Sigbjørn Skjæret --- diff --git a/ggml/src/ggml-webgpu/ggml-webgpu.cpp b/ggml/src/ggml-webgpu/ggml-webgpu.cpp index 32f1e304..e5df883c 100644 --- a/ggml/src/ggml-webgpu/ggml-webgpu.cpp +++ b/ggml/src/ggml-webgpu/ggml-webgpu.cpp @@ -611,6 +611,8 @@ static bool ggml_webgpu_encode_node(webgpu_context ctx, ggml_tensor * node) { case GGML_OP_NONE: case GGML_OP_VIEW: case GGML_OP_PERMUTE: + case GGML_OP_TRANSPOSE: + case GGML_OP_RESHAPE: return false; case GGML_OP_CPY: { @@ -1062,6 +1064,8 @@ static bool ggml_backend_webgpu_device_supports_op(ggml_backend_dev_t dev, const case GGML_OP_NONE: case GGML_OP_VIEW: case GGML_OP_PERMUTE: + case GGML_OP_TRANSPOSE: + case GGML_OP_RESHAPE: return true; case GGML_OP_CPY: case GGML_OP_SET_ROWS: