Add RISC-V smoke test on QEMU#19399
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19399
Note: Links to docs will display an error until the docs builds have been completed. ❌ 17 Awaiting Approval, 1 New FailureAs of commit 3f9eaa1 with merge base 9889c7c ( AWAITING APPROVAL - The following workflows need approval before CI can run:
NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
| run: | ||
| uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | ||
| with: | ||
| runner: ubuntu-latest |
There was a problem hiding this comment.
I missed that, it should be a linux.Yxlarge. I'll update it
Implements Phase 1 of the RISC-V Support RFC (pytorch#18991): cross-compile executor_runner for riscv64-linux-gnu, run a small BundledProgram under qemu-user-static on a stock x86_64 GitHub runner, and assert the standard "Test_result: PASS" marker that the portable executor_runner already emits via the bundled-IO comparison path (examples/portable/executor_runner/executor_runner.cpp:646). The riscv64-linux preset mirrors arm-ethosu-linux: same Linux cross-compile shape, same standard executor_runner, same filesystem .pte, same option set with EXECUTORCH_ENABLE_BUNDLE_IO added so the runner self-checks. Single deviation is glibc-via-apt instead of musl to avoid the MUSL_TOOLCHAIN_ROOT tarball setup. The reusable _test_riscv.yml workflow is wired into pull.yml on every PR.
The error we would get on CI is: ``` /usr/bin/riscv64-linux-gnu-gcc --sysroot=/usr/riscv64-linux-gnu -o CMakeFiles/cmTC_eb936.dir/testCCompiler.c.o -c /pytorch/executorch/cmake-out/CMakeFiles/CMakeScratch/TryCompile-o3upsB/testCCompiler.c Linking C executable cmTC_eb936 /opt/conda/envs/py_3.10/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_eb936.dir/link.txt --verbose=1 /usr/lib/gcc-cross/riscv64-linux-gnu/11/../../../../riscv64-linux-gnu/bin/ld: cannot find /usr/riscv64-linux-gnu/lib/libc.so.6 inside /usr/riscv64-linux-gnu /usr/lib/gcc-cross/riscv64-linux-gnu/11/../../../../riscv64-linux-gnu/bin/ld: cannot find /usr/riscv64-linux-gnu/lib/libc_nonshared.a inside /usr/riscv64-linux-gnu /usr/lib/gcc-cross/riscv64-linux-gnu/11/../../../../riscv64-linux-gnu/bin/ld: cannot find /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 inside /usr/riscv64-linux-gnu collect2: error: ld returned 1 exit status ```
Summary
Implements Phase 1 of the RISC-V Support RFC: cross-compile
executor_runnerforriscv64-linux-gnu, run a small BundledProgram underqemu-user-staticon a x86_64 runner, and assert the standard "Test_result: PASS" marker that the portable executor_runner already emits via the bundled-IO comparison path (examples/portable/executor_runner/executor_runner.cpp:6461).The
riscv64-linuxpreset mirrorsarm-ethosu-linux. The only deviation is glibc instead of musl to avoid theMUSL_TOOLCHAIN_ROOTtarball setup.The reusable
_test_riscv.ymlworkflow is is triggered viapull.ymlon every pull request.Test plan
Ran locally, and integration to CI for automated testing.
cc @GregoryComer @digantdesai @cbilgin @psiddh @AdrianLundell @rascani @mergennachin