Draft
Conversation
Contributor
Author
|
Waitting for DMA optimize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR add
solve triop support for hexagon. Usehvxto accelarate the caculation.test-backend-ops.ne_lhs=[64,64,4,4], ne_rhs=[32,64,4,4]ne_lhs=[128,128,4,2], ne_rhs=[32,128,4,2]ne_lhs=[64,64,8,32], ne_rhs=[64,64,8,32]ne_lhs=[128,128,4,32], ne_rhs=[128,128,4,32]ne_lhs=[256,256,4,2], ne_rhs=[128,256,4,2]Perf summary
HTP0is faster on64x64, rhs=32:26.04vs16.55GFLOPS.HTP0is faster on128x128, rhs=32:29.29vs15.32GFLOPS.CPUis faster on64x64, rhs=64, batch=8x32:17.00vs8.46GFLOPS.HTP0is slightly faster on128x128, rhs=128, batch=4x32:15.54vs15.36GFLOPS.HTP0is faster on256x256, rhs=128:24.79vs8.99GFLOPS.Also I tested this with a full model on device using
Qwen3.5-0.8B-Q4_K_M.gguf. Here are representative tensor shape samples from the delta-net chunked path aroundSOLVE_TRI:common_debug_cb_eval: attn_pre_solve-21 = (f32) NEG(HTP0#attn-21#0{64, 64, 1, 16}, }) = {64, 64, 1, 16} common_debug_cb_eval: dnet_add_ch_attn_solved-21 = (f32) ADD(node_2574{64, 64, 1, 16}, HTP0#node_2571#0{64, 64, 1, 1}}) = {64, 64, 1, 16} common_debug_cb_eval: dnet_add_ch_lhs-22 = (f32) ADD(HTP0#attn-22#0{64, 64, 1, 16}, HTP0#node_2714#0{64, 64, 1, 1}}) = {64, 64, 1, 16} common_debug_cb_eval: attn_pre_solve-22 = (f32) NEG(HTP0#attn-22#0{64, 64, 1, 16}, }) = {64, 64, 1, 16} common_debug_cb_eval: dnet_add_ch_attn_solved-22 = (f32) ADD(node_2717{64, 64, 1, 16}, HTP0#node_2714#0{64, 64, 1, 1}}) = {64, 64, 1, 16}Requirements
YES, I use AI to learn the API usage of HVX and the algorithms for solving triangular matrix equations and review my code.