skills/hexagon/SKILL.md
Use this skill for MNN Hexagon DSP work where correctness, device stability, and measured DSPOpType profile data matter more than speculative micro-optimizations.
source/backend/hexagon.source/backend/hexagon/htp-ops-lib/src/dsp..so..so files into project/android/build_64.DSPOpType profile output.DSPOpType <OP> profile numbers, not only RTF or wall time.Run commands from the directories expected by the project scripts.
cd project/android/build_64cd project/android/build_64 && ../build_64.sh -DMNN_HEXAGON=ON -DMNN_GPU_TIME_PROFILE=ON && ../updateTest.shupdateTest.sh may print adb: error: cannot stat for optional binaries that are not built. Verify required binaries such as libMNN.so, ModuleBasic.out, and the target demo were pushed.source/backend/hexagon/htp-ops-lib/src/dsp/*:
cd source/backend/hexagon/htp-ops-lib && source ~/.bash_profile && sh sync_remote_build.shsh sync_remote_build.sh v79.cp source/backend/hexagon/htp-ops-lib/outputs/libMNN_htpops.so project/android/build_64/libMNN_htpops.socp source/backend/hexagon/htp-ops-lib/outputs/libMNN_htpops_skel.so project/android/build_64/libMNN_htpops_skel.soadb logcat -cadb logcat -drg -i "execute_command_group_profile failed|qurt|sysfatal|fatal|crash|tlb|cdsp.*crash|adsp.*crash|segv|signal 11"adb shell "ls -lt /data/tombstones /data/vendor/tombstones /data/vendor/ramdump /data/vendor/ssrdump 2>/dev/null | head -80"adb shell "find /data/tombstones /data/vendor/tombstones /data/vendor/ramdump /data/vendor/ssrdump -maxdepth 2 -type f 2>/dev/null | tail -40"rg -i "cdsp|adsp|qurt|sysfatal|fatal|crash|tlb|page fault|protection|signal|MNN|htp|fastrpc" <pulled_path>[Hexagon] execute_command_group_profile failed with code -2147482610.so after DSP edits.Hexagon DSP ProfileCommand groupsCommand dirtyDSPOpType <name> (<id>): <time> msHexagon onCopyBuffer Profile~/Download/hvx.pdf.vmem only when alignment is guaranteed; use vmemu for unaligned accesses.Use this when validating Hexagon/DSP memory footprint or comparing CPU vs forwardtype=10.
config.json to forwardtype=10.adb shell ps | grep <process_name>adb shell "awk '/VmRSS:|VmHWM:/{print}' /proc/<PID>/status"adb shell dmabuf_dump <PID>adb shell dumpsys meminfo <PID>adb shell cat /sys/kernel/debug/dma_buf/bufinfo/sys/kernel/dmabuf/buffers, which may require root.VmHWMTOTAL RSSTOTAL PSSdmabuf total or PROCESS TOTALVmHWM + dmabuf total when useful.cos_sim.DSPOpType target timing is reported and compared against a clear baseline.git diff --check is clean..so files are copied/pushed before reporting performance.