Skip to content

UPSTREAM PR #21540: metal : add XIELU op#1338

Open
loci-dev wants to merge 1 commit intomainfrom
loci/pr-21540-nuri-yoo-metal-add1-xielu
Open

UPSTREAM PR #21540: metal : add XIELU op#1338
loci-dev wants to merge 1 commit intomainfrom
loci/pr-21540-nuri-yoo-metal-add1-xielu

Conversation

@loci-dev
Copy link
Copy Markdown

@loci-dev loci-dev commented Apr 7, 2026

Note

Source pull request: ggml-org/llama.cpp#21540

Overview

Add Metal backend support for the XIELU (Extended Integral Exponential Linear Unit) operation.

XIELU is a parameterised activation function with four floats (alpha_n, alpha_p, beta, eps). The Metal kernel passes these through the existing ggml_metal_kargs_unary fields (slope, scale, bias, val) and uses select() to keep the implementation compatible with the vectorised (float4/half4) unary pipeline.

Mentioned in #14909

Testing

Tested on M4 Pro:

  • test-backend-ops test -o XIELU — 1/1 tests passed
$ ./build/bin/test-backend-ops test -o XIELU
  XIELU(type=f32,ne=[10,5,4,3]):      OK
  1/1 tests passed, Backend MTL0: OK

Requirements

@loci-review
Copy link
Copy Markdown

loci-review Bot commented Apr 7, 2026

No meaningful performance changes were detected across 125311 analyzed functions in the following binaries: build.bin.libllama.so, build.bin.llama-tts, build.bin.llama-bench, build.bin.libmtmd.so, build.bin.llama-cvector-generator, build.bin.llama-tokenize, build.bin.libggml-cpu.so, build.bin.libggml.so, build.bin.libggml-base.so, build.bin.llama-gemma3-cli, build.bin.llama-gguf-split, build.bin.llama-llava-cli, build.bin.llama-minicpmv-cli, build.bin.llama-quantize, build.bin.llama-qwen2vl-cli.

💬 Questions? Tag @loci-dev

@loci-dev loci-dev force-pushed the main branch 8 times, most recently from 06d9e10 to e800934 Compare April 14, 2026 02:18
@loci-dev loci-dev force-pushed the main branch 7 times, most recently from 7638ab4 to f1b46d5 Compare April 20, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants