Closed dcy11011 closed 2 years ago
Hi @dcy11011, thanks for the report. Since llvm-stress is a tool used to generate random IRs for testing LLVM, it is "normal" behavior for it to occasionally break the compiler 🙂 The workaround is to simply catch compiler_gym.errors.BenchmarkInitError
errors and skip it to try a different program:
try:
env.reset(benchmark=my_benchmark)
except BenchmarkInitError:
print("unusable program, skip this ...")
You can expect this error to be triggered infrequently by either of the program generators (llvm-stress-v0 and csmith-v0), I have also seen it with one or two of the Anghabench programs.
The important thing is that the error raised by CompilerGym is a BenchmarkInitError
:
In the traceback above I only see a ValueError
. Is that right? If so, please re-open this issue.
Cheers, Chris
Many thanks! It dose raised BenchmarkInitError
. I missed it as it is surrounded by a bunch of clang errors. I noticed there're benchmarks causing errors in Anghabench, too. I'll just skip all these benchmarks as you suggested :)
🐛 Bug
CompilerGym backend crashed when llvm-v0 enviornment try to load benchmark
generator://llvm-stress-v0/173
To Reproduce
The traceback is:
(This was followed by a long period of clang's error message)
Environment