Skip to content

hexagon: add pool op support - #29995

Merged
max-krasnyansky merged 10 commits into
ggml-org:masterfrom
qualcomm:aparmp/hexagon-pool
Oct 5, 2026
Merged

max-krasnyansky merged 10 commits into
ggml-org:masterfrom
qualcomm:aparmp/hexagon-pool

Conversation

@aparmp-quic

Copy link
Copy Markdown
Contributor

Overview

Adds HTP support for 1D and 2D average/max pooling, required by the Gemma 4 image encoder CLIP graph.

Additional information

  • Add HTP acceleration for FP32 POOL_1D and POOL_2D operations.
  • Support both average and max pooling modes.
  • Enable common pooling configurations, including arbitrary stride, padding, exact tiling, and global pooling.
  • POOL_1D reuses the 2D kernel by treating each slice as a plane with height 1.
  • POOL_2D general cases with less than 32 vectorizable interior columns remain on CPU.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES. AI was used for implementation review, reasoning, bug analysis, and internal test case generation. The changes were validated manually by the contributor.

@aparmp-quic
aparmp-quic requested a review from a team as a code owner October 5, 2026 13:00
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning Hexagon labels Oct 5, 2026
@max-krasnyansky

Copy link
Copy Markdown
Member

@lhez for second review/ack. Looks like CI is good.

@max-krasnyansky
max-krasnyansky merged commit 50569eb into ggml-org:master Oct 5, 2026
34 of 37 checks passed
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 8, 2026
* hexagon: add pool_2d support

* hexagon: add pool_1d support

* hex-pool: dma changes

* hex-pool: Optimize HTP pooling boundaries and DMA pipelining

* hex-pool: code cleanup and correctness fixes

* hex-pool: re-write the DMA pipeline

* hex-pool: pool chunking support

* hex-pool: remove/vectorize all scalar paths

* hex-pool: simplify chunk solver (no need for a loop)

* hex-pool: remove redundant checks

---------

Co-authored-by: Max Krasnyansky <maxk@qti.qualcomm.com>
(cherry picked from commit 50569eb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Hexagon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants