Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-et/et-kernels/scripts/check_unimplemented_instructions.sh # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-et / et-kernels / scripts / check_unimplemented_instructions.sh` 36 lines ยท 1370 bytes Raw Blame History 1 #!/bin/bash 2 3 OBJDUMP=$1 4 ADDR2LINE=$2 5 TARGET_DEBUG=$3 6 TARGET_ASM=${TARGET_DEBUG}.S 7 BAD_INST_FILE=${TARGET_DEBUG}-BAD-INST.log 8 9 # grep expression to find unimplemented instructions 10 UNIMPLEMENTED_EXPR="fdiv.s\\|fsqrt.s\\|fcvt.l.s\\|fcvt.lu.s\\|fcvt.s.l\\|fcvt.s.lu\\|fdiv.pi\\|fdivu.pi\\|fremu.pi\\|frem.pi\\|fdiv.ps\\|fsqrt.ps\\|frsq.ps\\|fsin.ps" 11 12 # dump assembly into .S file 13 ${OBJDUMP} -lwdSC ${TARGET_DEBUG} > ${TARGET_ASM} 14 15 # check with grep for unimplemented instructions 16 # Note: The exit status is 0 if selected lines are found, and 1 if not found. 17 grep ${UNIMPLEMENTED_EXPR} ${TARGET_ASM} > /dev/null 18 ret=$? 19 20 if [ ${ret} -eq 0 ] 21 then 22 # unimplemented instructions are found 23 echo -e "BUILD ERROR: Executable file ${TARGET_DEBUG} contains unimplemented instructions. Please review the lines of code listed in ${BAD_INST_FILE}" 24 echo -e "\t For further details, please read paragraph 3.4 of the ETSoC-1 Programmer's Reference Manual (PRM)" 25 26 # addr2line 27 grep ${UNIMPLEMENTED_EXPR} ${TARGET_ASM} | cut -d: -f 1 | ${ADDR2LINE} -i -e ${TARGET_DEBUG} > ${BAD_INST_FILE} 28 grep ${UNIMPLEMENTED_EXPR} ${TARGET_ASM} >> ${BAD_INST_FILE} 29 echo "------------------------------------------------------------" 30 cat ${BAD_INST_FILE} 31 echo "------------------------------------------------------------" 32 exit 1 33 34 else 35 rm -f ${BAD_INST_FILE} 36 fi