File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,30 @@ jobs:
254254 exit 1
255255 fi
256256
257+ elf="cmake-out/test/size_test"
258+
259+ # Dump basic info
260+ ls -al ${elf}
261+ ${toolchain_prefix}size ${elf}
262+
263+ # Dump symbol
264+ python .github/scripts/run_nm.py -e ${elf}
265+ python .github/scripts/run_nm.py -e ${elf} -f "executorch" -p "${toolchain_prefix}"
266+ python .github/scripts/run_nm.py -e ${elf} -f "executorch_text" -p "${toolchain_prefix}"
267+
268+ # Add basic guard - TODO: refine this!
269+ ${toolchain_prefix}strip ${elf}
270+ output=$(ls -la ${elf})
271+ arr=($output)
272+ size=${arr[4]}
273+ echo "size: $size, threshold: $threshold"
274+ if [[ "$size" -le "$threshold" ]]; then
275+ echo "Success $size <= $threshold"
276+ else
277+ echo "Fail $size > $threshold"
278+ exit 1
279+ fi
280+
257281 nxp-build-test :
258282 name : nxp-build-test
259283 uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
You can’t perform that action at this time.
0 commit comments