wasm-micro-runtime/tests/benchmarks
Wenyong Huang c254bffbc5
Fix compile errors on workload bwa and benchmark jetstream (#3617)
Error was reported when building jetstream benchmark with emsdk:
```
clang: error: unsupported option '-msse2' for target 'wasm32-wasi'
```

Error was reported when building bwa workload:
```
fatal: reference is not a tree: 139f68fc4c3747813783a488aef2adc86626b01b
```
2024-07-12 16:58:10 +08:00
..
coremark Fix download link for wasi-sdk (#3077) 2024-01-24 13:42:45 +08:00
dhrystone Enable static PGO for Linux SGX (#2270) 2023-06-09 14:13:43 +08:00
jetstream Fix compile errors on workload bwa and benchmark jetstream (#3617) 2024-07-12 16:58:10 +08:00
libsodium Fix typos in libsodium workload (#2825) 2023-11-27 15:53:37 +08:00
polybench Fix download link for wasi-sdk (#3077) 2024-01-24 13:42:45 +08:00
sightglass Fix download link for wasi-sdk (#3077) 2024-01-24 13:42:45 +08:00
README.md Implement AOT static PGO (#2243) 2023-06-05 09:17:39 +08:00

WAMR test benchmarks

This folder contains test benchmarks for wamr.

Build and Run

Refer to the README.md under each folder for how to build and run the benchmark.

Install llvm-profdata

The tool llvm-profdata is used when running the test_pgo.sh script under the benchmark folder. There are two ways to install it:

  1. Refer to https://apt.llvm.org/, e.g. in Ubuntu 20.04, add lines below to /etc/apt/source.list
deb http://apt.llvm.org/focal/ llvm-toolchain-focal main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
# 15
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main

Then run sudo apt update, sudo apt install llvm. And after installing:

cd /usr/bin
sudo ln -s llvm-profdata-15 llvm-profdata
  1. Build manually
git clone --depth 1 --branch release/15.x https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build && cd build
cmake ../llvm \
    -DCMAKE_BUILD_TYPE:STRING="Release" \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
    -DLLVM_APPEND_VC_REV:BOOL=ON \
    -DLLVM_BUILD_EXAMPLES:BOOL=OFF \
    -DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
    -DLLVM_BUILD_TESTS:BOOL=OFF \
    -DLLVM_CCACHE_BUILD:BOOL=ON \
    -DLLVM_ENABLE_BINDINGS:BOOL=OFF \
    -DLLVM_ENABLE_IDE:BOOL=OFF \
    -DLLVM_ENABLE_LIBEDIT=OFF \
    -DLLVM_ENABLE_TERMINFO:BOOL=OFF \
    -DLLVM_ENABLE_ZLIB:BOOL=ON \
    -DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \
    -DLLVM_INCLUDE_DOCS:BOOL=OFF \
    -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \
    -DLLVM_INCLUDE_UTILS:BOOL=OFF \
    -DLLVM_INCLUDE_TESTS:BOOL=OFF \
    -DLLVM_BUILD_TESTS:BOOL=OFF \
    -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON \
    -DLLVM_ENABLE_LIBXML2:BOOL=OFF \
    -DLLVM_TARGETS_TO_BUILD:STRING="X86" \
    -DLLVM_INCLUDE_TOOLS:BOOL=ON \
    -G'Ninja'
ninja -j 8
# tool `llvm-profdata` is generated under this folder.