Conversation
Co-authored-by: GPT 5.6 Sol Signed-off-by: Anna Mayne <anna.mayne@arm.com>
…storage. Signed-off-by: Anna Mayne <anna.mayne@arm.com>
fadara01
left a comment
There was a problem hiding this comment.
Thank you for your PR!
Added some comments
| bfloat16x8_t va_pair = | ||
| zip1q_bf16(va[0], va[1]); // channels 0-3, inputs for taps 0-1 | ||
| vc0 = vbfdotq_f32(vc0, va_pair, | ||
| vb0); // 4 independent length-two dot products | ||
| va_pair = zip2q_bf16(va[0], va[1]); // channels 4-7, inputs for taps 0-1 | ||
| vc1 = vbfdotq_f32(vc1, va_pair, vb1); | ||
| va_pair = zip1q_bf16(va[2], va[3]); // channels 0-3, inputs for taps 2-3 | ||
| vc0 = | ||
| vbfdotq_f32(vc0, va_pair, | ||
| vb2); // Add to the previous result for the same channels | ||
| va_pair = zip2q_bf16(va[2], va[3]); // channels 4-7, inputs for taps 2-3 | ||
| vc1 = vbfdotq_f32(vc1, va_pair, vb3); |
There was a problem hiding this comment.
maybe we can we load more bf16 pairs from B and have more independent bfdot streams here to better exploit the CPUs SIMD pipelines?
does this improve perf in a micro benchmark for this op?
There was a problem hiding this comment.
I tried a 16-channel tile instead, doubling the number of bfdot instructions. This showed small improvements (~9%) in my microbenchmark for prefill with 1024 tokens and no change with 128 tokens. There was no improvement for decode across a range of batch sizes. And e2e tests using vllm bench throughput showed no perf uplift.
| conv_state_view = conv_buf[:, :, : width - 1] | ||
| if current_platform.get_cpu_architecture() == CpuArchEnum.ARM: | ||
| decode_conv_state = conv_state_view[decode_state_indices].contiguous() | ||
| decode_mixed_qkv = causal_conv1d_update_torch( |
There was a problem hiding this comment.
are there any un-used functions we can trim from https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/layers/mamba/ops/cpu/causal_conv1d.py
There was a problem hiding this comment.
…r changes from PR feedback. Signed-off-by: Anna Mayne <anna.mayne@arm.com>
|
@bigPYJ1151 - could you please take a look? |
|
@bigPYJ1151 could you please have a look? |
Purpose
Advanced SIMD implementation for aarch64 of the causal conv1d kernel used in Gated DeltaNets. Includes faster silu implementation with fexp.
Test Plan
Run related tests:
Run e2e inference on Qwen 3.5 MoE model and demonstrate improved performance.
Test Result
Unit tests all pass.
Perf uplift of ~9% on 64 Neoverse V2 cores: