Skip to content

Instantly share code, notes, and snippets.

@fwsGonzo
Last active June 30, 2024 08:16
Show Gist options
  • Save fwsGonzo/7ef100ba4fe7116e97ddb20cf26e6879 to your computer and use it in GitHub Desktop.
Save fwsGonzo/7ef100ba4fe7116e97ddb20cf26e6879 to your computer and use it in GitHub Desktop.
CoreMark: libriscv w/binary translation, Ryzen 7950X
$ ./rvlinux -v ~/github/coremark/coremark-rv32g_b
* Loading program of size 75145 from 0x7b3915ebe010 to virtual 0x10000 -> 0x22589
* Program segment readable: 1 writable: 0 executable: 1
* Loading program of size 1864 from 0x7b3915ed059c to virtual 0x2358c -> 0x23cd4
* Program segment readable: 1 writable: 1 executable: 0
Found embedded translation for hash 17A11122
* Entry is at 0x109f4
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 16913
Total time (secs): 16.913000
Iterations/Sec : 35475.669603
Iterations : 600000
Compiler version : GCC13.2.0
Compiler flags : -O3 -DPERFORMANCE_RUN=1
Memory location : Please put data memory location here
(e.g. code in flash, data on heap etc)
seedcrc : 0xe9f5
[0]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[0]crcfinal : 0xa14c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 35475.669603 / GCC13.2.0 -O3 -DPERFORMANCE_RUN=1 / Static
>>> Program exited, exit code = 0 (0x0)
Runtime: 20048.304ms (Use --accurate for instruction counting)
Pages in use: 25 (100 kB virtual memory, total 463 kB)
@fwsGonzo
Copy link
Author

fwsGonzo commented Nov 13, 2023

Without binary translation:

$ ./rvlinux ~/github/coremark/coremark-15-rv32gb 
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 16860
Total time (secs): 16.860000
Iterations/Sec   : 3558.718861
Iterations       : 60000
Compiler version : GCC15.0.0 20240429 (experimental)
Compiler flags   : -O3 -DPERFORMANCE_RUN=1  
Memory location  : Please put data memory location here
			(e.g. code in flash, data on heap etc)
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0xbd59
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 3558.718861 / GCC15.0.0 20240429 (experimental) -O3 -DPERFORMANCE_RUN=1   / Static
>>> Program exited, exit code = 0 (0x0)
Instructions executed: 20514801086  Runtime: 20073.410ms  Insn/s: 1022mi/s
Pages in use: 26 (104 kB virtual memory, total 335 kB)

@fwsGonzo
Copy link
Author

fwsGonzo commented Jun 13, 2024

With TCC as JIT-like translator:

$ VERBOSE=1 ./rvlinux -v ~/github/coremark/coremark-rv32g_b 
* Loading program of size 75145 from 0x72d6208b8010 to virtual 0x10000
* Program segment readable: 1 writable: 0  executable: 1
* Loading program of size 1864 from 0x72d6208ca59c to virtual 0x2358c
* Program segment readable: 1 writable: 1  executable: 0
* Entry is at 0x109f4
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 16756
Total time (secs): 16.756000
Iterations/Sec   : 6564.812604
Iterations       : 110000
Compiler version : GCC13.2.0
Compiler flags   : -O3 -DPERFORMANCE_RUN=1  
Memory location  : Please put data memory location here
			(e.g. code in flash, data on heap etc)
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0x33ff
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 6564.812604 / GCC13.2.0 -O3 -DPERFORMANCE_RUN=1   / Static
>>> Program exited, exit code = 0 (0x0)
Runtime: 18445.373ms   (Use --accurate for instruction counting)
Pages in use: 25 (100 kB virtual memory, total 462 kB)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment