RISC-V公測平臺發布· CoreMark測試報告

一. CoreMark簡介

CoreMark是一款用于評估CPU性能的基準測試程序,它包含了多種不同的計算任務,包括浮點數、整數、緩存、內存等方面的測試。CoreMark的測試結果通常被用來作為CPU性能的參考,它可以幫助開發人員和系統管理員評估不同處理器和系統的性能,比較不同處理器之間的性能差異,也可以用來測試處理器在多線程并行計算方面的性能。

官網地址:
https://www.eembc.org

二. 平臺環境
[硬件參數]
處理器: 算能SG2042 x 1
核心數: 64核
L1 Cache: I:64KB and D:64KB
L2 Cache: 1MB/Cluster
L3 Cache: 64MB System Cache
DRAM: DDR4  16Gx4
[軟件環境]

linux版本: 22.10

gcc版本: 10.2.0

三. 獲取源碼
EEMBC將CoreMark源碼托管在GitHub上,可以訪問以下鏈接獲得源碼;也可以通過git命令下載到本地。

鏈接

https://github.com/eembc/coremark

四. 編譯

本次采用的編譯器是支持RVV的編譯器,在我們的體驗機器上已經完成了部署,可以通過文章下方的聯系方式進群體驗。

1:首先需要修改core_portme.mak文件,(在LFLAGAS_END變量添加-lpthread)

2:添加編譯參數:-march=rv64gcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920。

添加完成后效果如下:

# Flag: CC
#    Use this flag to define compiler to use
CC = gcc
# Flag: CFLAGS
#    Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags
"PORT_CFLAGS = -O3
#===============================Alter by me===========================
PF_CFLAGS = -march=rv64gcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END) $(PF_CFLAGS)"
CFLAGS = $(PORT_CFLAGS) $(PF_CFLAGS) -I$(PORT_DIR) -Iposix -I. -DFLAGS_STR=\"
$(FLAGS_STR)\"
#===============================Alter by me===========================
# Flag: NO_LIBRT
#    Define if the platform does not provide a librt
ifndef NO_LIBRT
#Flag: LFLAGS_END
#    Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts). 
#    Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt.
#===============================Alter by me===========================
LFLAGS_END += -lrt -lpthread
#===============================Alter by me===========================
 單核編譯

ubuntu@perfxlab:/public/benchmark/coremark$ make compile  XCFLAGS="-DMULTITHREAD=1 -DUSE_PTHREAD"

多核編譯

ubuntu@perfxlab:/public/benchmark/coremark$ make compile  XCFLAGS="-DMULTITHREAD=64 -DUSE_PTHREAD"

五. 在SG2042上執行coremark

1. 單核測試結果如下: RISC-V公測平臺發布· CoreMark測試報告的圖1

2. 64核測試結果如下:

RISC-V公測平臺發布· CoreMark測試報告的圖2

六. CoreMark分數排行榜

SG2042 的64核跑分結果為:692303.531830  ,cpu主頻是2GHz。

根據公式:

CoreMark / MHz = (CoreMark 分數) / (時鐘頻率,以兆赫茲為單位)

我們可以算出SG2042的 CoreMark / MHz=692303.531830/2000=346.55

從官網可以看到,截止目前(2023-8-16 )總共上傳了767款型號的CoreMark跑分結果。

官網鏈接

https://www.eembc.org/coremark/scores.php 

RISC-V公測平臺發布· CoreMark測試報告的圖3

圖1:Coremark分數從高到低排序

RISC-V公測平臺發布· CoreMark測試報告的圖4   圖2:Coremark/MHz 分數從高到低排序

登錄后免費查看全文
立即登錄
App下載
技術鄰APP
工程師必備
  • 項目客服
  • 培訓客服
  • 平臺客服

TOP