feat: Hexagon backend support for CONCAT#62
Conversation
This adds support for `GGML_OP_CONCAT` in the Hexagon HVX backend. It implements a fast path for `dim==0` 2D concatenation where `src0` is untransposed and `src1` is transposed (a common case). The fast path leverages 2D DMA and the Hexagon `vgather` instructions (`Q6_vgather_ARMVw` / `Q6_vgather_ARMVh`) to untranspose the elements efficiently using HVX vectors. A fully generalized scalar fallback is provided for arbitrary layouts and N-dimensional concatenation. Fixes correctly size the VTCM padded allocation boundaries and byte offsets mapping for gathered vector indices. Co-authored-by: max-krasnyansky <1380796+max-krasnyansky@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This adds support for `GGML_OP_CONCAT` in the Hexagon HVX backend. It implements a fast path for `dim==0` 2D concatenation where `src0` is untransposed and `src1` is transposed (a common case). The fast path leverages 2D DMA and the Hexagon `vgather` instructions (`Q6_vgather_ARMVw` / `Q6_vgather_ARMVh`) to untranspose the elements efficiently using HVX vectors. A fully generalized scalar fallback is provided for arbitrary layouts and N-dimensional concatenation. Fixes correctly size the VTCM padded allocation boundaries and byte offsets mapping for gathered vector indices. It also replaces deprecated DMA calls with standard `dma_queue_push` and `dma_queue_pop`, and uses `size_t` rather than the unavailable `Word32` type for the address parameter of `vgather`. Co-authored-by: max-krasnyansky <1380796+max-krasnyansky@users.noreply.github.com>
Implemented CONCAT operation for the Hexagon backend with an optimized 2D transposed path and generic fallback.
PR created automatically by Jules for task 1580213926700525858 started by @max-krasnyansky