llama.cpp
643b0cda - hexagon: Op Fusion refactoring, optimizations and new fusions like `BINARY_NX` (back-to-back ADDs, etc) (#30843)

Commit
2 days ago
hexagon: Op Fusion refactoring, optimizations and new fusions like `BINARY_NX` (back-to-back ADDs, etc) (#30843) * hex-fusion: support for GELU+MUL, REPEAT+GET_ROWS and BINARY_NX (back-to-back ADD/MUL/...) * hex-fusion: factor out fusion logic into separate .h and .cpp and update all related code * hex-fusion: allow for RMS_NORM+MUL fusions for non-contig tensors * hex-fusion: streamline fusion eligibility checks and cover missing corner cases * hex-fusion: streamline fusion flow * hex-opbatch: make n_tensors limit more scalable * hex-bufs: adjust the trace buff sizing * hex-glu: cleanup glu-ops interfaces and add kernel_params * hex-kparams: clean up kparams handling in unary, ssm-conv, and other ops * hex-kparams: update the rest of the ops PAD,DIAG,... to use kparams * hex-unary: add support for collapsing dims * hex-ops: cleanup redundant runtime checks * hex-ops: consistent use of kernel_type in all kparams * hex-fusion: remove redundant check in gdn+cpy * hex-fusion: further streamlining of fusion rules and code * hex-fusion: cleanup naming * hex-opfmt: cleanup op formatting * hex-fusion: bump fusion lookahead to 64 * hex-fusion: fuse SSM_CONV+SILU * hex-fusion: fix hvx register spills in fused ssm_conv+silu * hex-fusion: add more GLU fusions * hex-fusion: remove duplicate checks and use ggml-common helpers * hex-kparams: refactor kparams into htp-kparams.h/cpp * hex-fusion: fix binary-nx fusion regression * hex-kparams: another pass at cleaning up kparams (removing unused, etc) * hex-kparams: streamling nameing and move _check_ wrappers into .h * hex-kparams: templetize htp_kparams_check_<op> to reduce code bloat * hex-ops: de-duplicate op dispatch switches * hex-kparams: trim down exposed kparams calls * hex-kparams: simplify type casting of kparams structs * hex-fence: de-dup fence tensor construction * hex-opbatch: simplify tensor shape init/checks * hex-mm: cleanup leftovers of the original QK defines * hex-fa: fix stack overflow on older npu firmware * hex-ctx: move dma_caches into ops_ctx
Parents
Loading