riscv-vector-tests icon indicating copy to clipboard operation
riscv-vector-tests copied to clipboard

Generating stage2 patches fails with a modified env

Open LekKit opened this issue 10 months ago • 1 comments

RVVM uses a forked riscv-test-env tree where write_tohost is implemented via printing results to UART and shutting down the machine.

This can be seen here: https://github.com/riscv/riscv-test-env/commit/002df18087a5f7c7d068757329244adde3243e93

This works well for riscv-tests, but hangs riscv-vector-tests build as soon as Spike is invoked to generate test results for stage 2:

make[1]: Entering directory '/home/lekkit/stuff/riscv-vector-tests'
LD_LIBRARY_PATH=/lib build/pspike --isa=rv64gcv_zvbb_zvbc_zfh_zvfh_zvkg_zvkned_zvknha_zvksed_zvksh_zvl256b_zve64d_zfh_zfhmin_zvfh  out/v256x64machine/bin/stage1/vaadd_vv-0 > out/v256x64machine/patches/stage2/vaadd_vv-0.patch
...
[no progress]

Shouldn't test env only be used when building stage2? Or maybe altering write_tohost is not supposed to work correctly, but how am I supposed to report test status then?

LekKit avatar Feb 22 '25 22:02 LekKit

Oops, I overlooked this issue, sorry! :(

At stage 1, tests are generated and compiled, then run by a special spike called pspike to generate the reference results; At stage 2, tests are combined with those reference results, compiled, and then run by standard spike to verify it's working as expected.

From your log, it's pspike at stage1 stuck as the env is changed to something else, but spike relies on HTIF (tohost) to work.

A workaround would be to keep the env unchanged at stage1, and change the env at stage2 while removing the verify process.

ksco avatar Apr 23 '25 06:04 ksco