I'm running Spec2017 with expanded inputs (via the alberta workloads: https://webdocs.cs.ualberta.ca/~amaral/AlbertaWorkloadsForSPECCPU2017/). The 657.xz_s benchmark takes a compressed file and a hash of the uncompressed file, decompresses it the compares the hash of the output with the hash it was given. For one of these expanded workloads (comp-small), Gem5 fails the hash comparison when decompressing the input. The benchmark works with this input when run natively though, and Gem5's KVM CPU. I've tried this with both AtomicSimpleCPU whole program simulation, and DerivO3CPU with restoring simpoint checkpoints.
For reference, here's the output when run natively:
SPEC CPU XZ driver: input=code.c.xz insize=6
Loading Input Data
Compressed size: 1045568; Uncompressed size: 6291456
SHA-512 of decompressed data compared successfully!
SHA-512 of input file: b8d1b37a838dbebf3c02e0f2676a9f92e96b3395601048a22bd92823dca36e28d77513484b33401a2bf78b27bb10ba9bfb014abf149804dee7f9752eacc78deb
Input data 6291456 bytes in length
Compressing Input Data, level 9
Compressed data 1045568 bytes in length
Compressed data length of 1045568 is outside the allowable range of 1 to 9 bytes
Finished compressing data
Uncompressing previously compressed data
Uncompressed data 6291456 bytes in length
Uncompressed data compared correctly
Tested 6 MiB buffer: OK!
And here's the Gem5 command I'm using and the output:
Command: ./build/X86/gem5.opt configs/deprecated/example/se.py --cpu-type=AtomicSimpleCPU -c ./xz_s_peak.mytest-64 --options="code.c.xz 6 7bcc91a140bc1bf181e9a5a4cb752b37e31b290f189141b784921bcda7cfa9ea949708dbc800db0d2d6023e15d271389714d14fc1040c97300a86ac230f824c6 1 9 9"
Output:
warn: The se.py script is deprecated. It will be removed in future releases of gem5.
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (65536 Mbytes)
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
system.remote_gdb: Listening for connections on port 7002
**** REAL SIMULATION ****
src/sim/simulate.cc:199: info: Entering event queue @ 0. Starting simulation...
src/sim/syscall_emul.cc:74: warn: ignoring syscall set_robust_list(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall rseq(...)
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
SPEC CPU XZ driver: input=code.c.xz insize=6
Loading Input Data
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
Compressed size: 1045568; Uncompressed size: 6291456
src/arch/generic/debugfaults.hh:145: warn: MOVNTPS: Ignoring non-temporal hint, modeling as cacheable!
Hash mismatch at 0: 'b8' (expected) != '7b' (generated)
Computed SHA-512 sum for decompressed input did not match expected
Generated: 7bcc91a140bc1bf181e9a5a4cb752b37e31b290f189141b784921bcda7cfa9ea949708dbc800db0d2d6023e15d271389714d14fc1040c97300a86ac230f824c6
Expected: warn: The se.py script is deprecated. It will be removed in future releases of gem5.
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (65536 Mbytes)
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
system.remote_gdb: Listening for connections on port 7002
**** REAL SIMULATION ****
src/sim/simulate.cc:199: info: Entering event queue @ 0. Starting simulation...
src/sim/syscall_emul.cc:74: warn: ignoring syscall set_robust_list(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall rseq(...)
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
SPEC CPU XZ driver: input=code.c.xz insize=6
Loading Input Data
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
Compressed size: 1045568; Uncompressed size: 6291456
src/arch/generic/debugfaults.hh:145: warn: MOVNTPS: Ignoring non-temporal hint, modeling as cacheable!
Hash mismatch at 0: 'b8' (expected) != '7b' (generated)
Computed SHA-512 sum for decompressed input did not match expected
Generated: 7bcc91a140bc1bf181e9a5a4cb752b37e31b290f189141b784921bcda7cfa9ea949708dbc800db0d2d6023e15d271389714d14fc1040c97300a86ac230f824c6
Expected: b8d1b37a838dbebf3c02e0f2676a9f92e96b3395601048a22bd92823dca36e28d77513484b33401a2bf78b27bb10ba9bfb014abf149804dee7f9752eacc78deb
Exiting @ tick 445615434500 because exiting with last active thread context
Simulated exit code not 0! Exit code is 1b8d1b37a838dbebf3c02e0f2676a9f92e96b3395601048a22bd92823dca36e28d77513484b33401a2bf78b27bb10ba9bfb014abf149804dee7f9752eacc78deb
Exiting @ tick 445615434500 because exiting with last active thread context
Simulated exit code not 0! Exit code is 1
Sent with Proton Mail secure email.
Sorry I made a small mistake in the Gem5 command I gave. The --options flag should be: --options="code.c.xz 6 b8d1b37a838dbebf3c02e0f2676a9f92e96b3395601048a22bd92823dca36e28d77513484b33401a2bf78b27bb10ba9bfb014abf149804dee7f9752eacc78deb 1 9 9"
Sent with Proton Mail secure email.
On Thursday, August 14th, 2025 at 3:30 PM, muke101 via gem5-dev gem5-dev@gem5.org wrote:
I'm running Spec2017 with expanded inputs (via the alberta workloads: https://webdocs.cs.ualberta.ca/~amaral/AlbertaWorkloadsForSPECCPU2017/). The 657.xz_s benchmark takes a compressed file and a hash of the uncompressed file, decompresses it the compares the hash of the output with the hash it was given. For one of these expanded workloads (comp-small), Gem5 fails the hash comparison when decompressing the input. The benchmark works with this input when run natively though, and Gem5's KVM CPU. I've tried this with both AtomicSimpleCPU whole program simulation, and DerivO3CPU with restoring simpoint checkpoints.
For reference, here's the output when run natively:
SPEC CPU XZ driver: input=code.c.xz insize=6
Loading Input Data
Compressed size: 1045568; Uncompressed size: 6291456
SHA-512 of decompressed data compared successfully!
SHA-512 of input file: b8d1b37a838dbebf3c02e0f2676a9f92e96b3395601048a22bd92823dca36e28d77513484b33401a2bf78b27bb10ba9bfb014abf149804dee7f9752eacc78deb
Input data 6291456 bytes in length
Compressing Input Data, level 9
Compressed data 1045568 bytes in length
Compressed data length of 1045568 is outside the allowable range of 1 to 9 bytes
Finished compressing data
Uncompressing previously compressed data
Uncompressed data 6291456 bytes in length
Uncompressed data compared correctly
Tested 6 MiB buffer: OK!
And here's the Gem5 command I'm using and the output:
Command: ./build/X86/gem5.opt configs/deprecated/example/se.py --cpu-type=AtomicSimpleCPU -c ./xz_s_peak.mytest-64 --options="code.c.xz 6 7bcc91a140bc1bf181e9a5a4cb752b37e31b290f189141b784921bcda7cfa9ea949708dbc800db0d2d6023e15d271389714d14fc1040c97300a86ac230f824c6 1 9 9"
Output:
warn: The se.py script is deprecated. It will be removed in future releases of gem5.
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (65536 Mbytes)
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
system.remote_gdb: Listening for connections on port 7002
**** REAL SIMULATION ****
src/sim/simulate.cc:199: info: Entering event queue @ 0. Starting simulation...
src/sim/syscall_emul.cc:74: warn: ignoring syscall set_robust_list(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall rseq(...)
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
SPEC CPU XZ driver: input=code.c.xz insize=6
Loading Input Data
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
Compressed size: 1045568; Uncompressed size: 6291456
src/arch/generic/debugfaults.hh:145: warn: MOVNTPS: Ignoring non-temporal hint, modeling as cacheable!
Hash mismatch at 0: 'b8' (expected) != '7b' (generated)
Computed SHA-512 sum for decompressed input did not match expected
Generated: 7bcc91a140bc1bf181e9a5a4cb752b37e31b290f189141b784921bcda7cfa9ea949708dbc800db0d2d6023e15d271389714d14fc1040c97300a86ac230f824c6
Expected: warn: The se.py script is deprecated. It will be removed in future releases of gem5.
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (65536 Mbytes)
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
system.remote_gdb: Listening for connections on port 7002
**** REAL SIMULATION ****
src/sim/simulate.cc:199: info: Entering event queue @ 0. Starting simulation...
src/sim/syscall_emul.cc:74: warn: ignoring syscall set_robust_list(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall rseq(...)
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
SPEC CPU XZ driver: input=code.c.xz insize=6
Loading Input Data
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
src/sim/mem_state.cc:448: info: Increasing stack size by one page.
Compressed size: 1045568; Uncompressed size: 6291456
src/arch/generic/debugfaults.hh:145: warn: MOVNTPS: Ignoring non-temporal hint, modeling as cacheable!
Hash mismatch at 0: 'b8' (expected) != '7b' (generated)
Computed SHA-512 sum for decompressed input did not match expected
Generated: 7bcc91a140bc1bf181e9a5a4cb752b37e31b290f189141b784921bcda7cfa9ea949708dbc800db0d2d6023e15d271389714d14fc1040c97300a86ac230f824c6
Expected: b8d1b37a838dbebf3c02e0f2676a9f92e96b3395601048a22bd92823dca36e28d77513484b33401a2bf78b27bb10ba9bfb014abf149804dee7f9752eacc78deb
Exiting @ tick 445615434500 because exiting with last active thread context
Simulated exit code not 0! Exit code is 1b8d1b37a838dbebf3c02e0f2676a9f92e96b3395601048a22bd92823dca36e28d77513484b33401a2bf78b27bb10ba9bfb014abf149804dee7f9752eacc78deb
Exiting @ tick 445615434500 because exiting with last active thread context
Simulated exit code not 0! Exit code is 1
Sent with Proton Mail secure email.