forked from tahoe-lafs/zfec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Tools | Intel" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
|
||
jobs: | ||
|
||
benchmark-tool-helpers: | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: "Check out zfex sources" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Run legacy_zfec.sh" | ||
run: | | ||
pushd zfex/bench/tools | ||
./legacy_zfec.sh | ||
popd | ||
- name: "Run zfex.sh" | ||
run: | | ||
pushd zfex/bench/tools | ||
./zfex.sh | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
################################################################################ | ||
### | ||
### This script will download zfex code and build bench_zfex | ||
### tool with different sets of compiler flags. Then, built executable will be | ||
### run with different arguments to measure algorithm's performance. | ||
### | ||
### Use CC environment variable to set a non-default compiler. | ||
### | ||
################################################################################ | ||
|
||
|
||
# cheat sheet: https://en.wikichip.org/wiki/intel/cpuid | ||
lscpu | ||
|
||
wget https://github.com/WojciechMigda/zfex/archive/refs/heads/main.zip -O zfex.zip | ||
unzip zfex.zip | ||
mv zfex-main zfex | ||
|
||
build() { | ||
|
||
make -C zfex/bench clean | ||
|
||
CFLAGS="${EXTRA_CFLAGS} -DZFEX_SIMD_ALIGNMENT=16 -DZFEX_USE_INTEL_SSSE3 -mssse3 -DZFEX_INLINE_ADDMUL -DZFEX_INLINE_ADDMUL_SIMD" \ | ||
make -C zfex/bench bench_zfex | ||
|
||
} | ||
|
||
run() { | ||
|
||
zfex/bench/bench_zfex ${ARGS} > /dev/null && zfex/bench/bench_zfex ${ARGS} | ||
|
||
} | ||
|
||
# Benchmark: -O2 -DZFEX_UNROLL_ADDMUL_SIMD=1 | ||
EXTRA_CFLAGS="-O2 -DZFEX_UNROLL_ADDMUL_SIMD=1" build | ||
|
||
ARGS="-A -k 7 -m 10 -s 1000000 -i 30" run | ||
ARGS="-A -k 223 -m 255 -s 43488 -i 30" run | ||
|
||
# Benchmark: -O3 -DZFEX_UNROLL_ADDMUL_SIMD=1 | ||
EXTRA_CFLAGS="-O3 -DZFEX_UNROLL_ADDMUL_SIMD=1" build | ||
|
||
ARGS="-A -k 7 -m 10 -s 1000000 -i 30" run | ||
ARGS="-A -k 223 -m 255 -s 43488 -i 30" run | ||
|
||
# Benchmark: -O3 -DZFEX_UNROLL_ADDMUL_SIMD=2 | ||
EXTRA_CFLAGS="-O3 -DZFEX_UNROLL_ADDMUL_SIMD=2" build | ||
|
||
ARGS="-A -k 7 -m 10 -s 1000000 -i 30" run | ||
ARGS="-A -k 223 -m 255 -s 43488 -i 30" run | ||
|
||
# Benchmark: -O3 -DZFEX_UNROLL_ADDMUL_SIMD=4 | ||
EXTRA_CFLAGS="-O3 -DZFEX_UNROLL_ADDMUL_SIMD=4" build | ||
|
||
ARGS="-A -k 7 -m 10 -s 1000000 -i 30" run | ||
ARGS="-A -k 223 -m 255 -s 43488 -i 30" run | ||
|
||
# Benchmark: -O3 -DZFEX_UNROLL_ADDMUL_SIMD=8 | ||
EXTRA_CFLAGS="-O3 -DZFEX_UNROLL_ADDMUL_SIMD=8" build | ||
|
||
ARGS="-A -k 7 -m 10 -s 1000000 -i 30" run | ||
ARGS="-A -k 223 -m 255 -s 43488 -i 30" run |