Repository navigation
hexagon: find software divide calls using binary inspection tool - #29449
Merged
Merged
Conversation
max-krasnyansky
approved these changes
Sep 26, 2026
Member
|
@lhez for second ack |
lhez
approved these changes
Sep 26, 2026
sky-mighty
pushed a commit
to sky-mighty/llama.cpp
that referenced
this pull request
Sep 26, 2026
…l-org#29449) * hex-scripts: fix table alignment * hex-scripts: find sw div calls using binary inspection tool
pierreguillot
pushed a commit
to Ircam-Partiels/llama.cpp
that referenced
this pull request
Oct 1, 2026
…l-org#29449) * hex-scripts: fix table alignment * hex-scripts: find sw div calls using binary inspection tool
frostyautumnleaf
pushed a commit
to frostyautumnleaf/llama.cpp
that referenced
this pull request
Oct 5, 2026
…l-org#29449) * hex-scripts: fix table alignment * hex-scripts: find sw div calls using binary inspection tool
edwardyoon
pushed a commit
to edwardyoon/focus-llama
that referenced
this pull request
Oct 7, 2026
…l-org#29449) * hex-scripts: fix table alignment * hex-scripts: find sw div calls using binary inspection tool (cherry picked from commit 4e74811)
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
Add
--swdivmode toggml-hexagon-inspect.pythat lists functions calling the Hexagon software divide/modulo helpers. Hexagon has no hardware unit for division, so these calls are expensive, and this mode helps find hot paths that use them.This PR also adds presets to build HTP skel with
DWARFsections needed forhexagon-addr2lineto map address to line numbers in src code.Additional information
Details
Because of LTO and inlining, most divides sit inside helpers several levels below the reported function. In the table above, all 11 divides in
op_cpyshow up as one line (cpy-ops.c:511).--inlineprints one line per call with its full inline chain, innermost frame first and the op code that led to it (whether it is a 32-bit or a much slower 64-bit (udivdi3) divide).Requirements