Skip to content

Commit 1497d41

Browse files
authored
Merge pull request #648 from ckormanyos/rl78_benches
Fix #649 with Rl78 benches
2 parents 504e894 + 66cc218 commit 1497d41

28 files changed

Lines changed: 223 additions & 23 deletions

.github/workflows/real-time-cpp-benchmarks.yml

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,60 @@ jobs:
108108
echo
109109
./target/build/test_app_benchmarks_avr.sh ${{ matrix.standard }}
110110
working-directory: ./ref_app/
111+
benchmark_builds-riscv:
112+
runs-on: ubuntu-latest
113+
defaults:
114+
run:
115+
shell: bash
116+
strategy:
117+
fail-fast: false
118+
matrix:
119+
standard: [ c++20 ]
120+
steps:
121+
- uses: actions/checkout@v4
122+
with:
123+
fetch-depth: '0'
124+
- name: update-tools
125+
run: |
126+
wget --no-check-certificate https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.2.0-3/xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz
127+
tar -xzf xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz -C ${{ runner.workspace }}
128+
working-directory: ./
129+
- name: benchmark_builds-riscv
130+
run: |
131+
PATH="${{ runner.workspace }}/xpack-riscv-none-elf-gcc-14.2.0-3/bin:$PATH"
132+
./target/build/test_app_benchmarks_riscv.sh ${{ matrix.standard }}
133+
working-directory: ./ref_app/
134+
benchmark_builds-rl78:
135+
runs-on: ubuntu-latest
136+
defaults:
137+
run:
138+
shell: bash
139+
strategy:
140+
fail-fast: false
141+
matrix:
142+
standard: [ c++23 ]
143+
steps:
144+
- uses: actions/checkout@v4
145+
with:
146+
fetch-depth: '0'
147+
- name: update-tools
148+
run: |
149+
wget --no-check-certificate https://github.com/ckormanyos/gcc-rl78-unknown-elf/releases/download/v15.1.0/gcc-15.1.0-rl78-unknown-elf.tar.gz
150+
tar -xzf gcc-15.1.0-rl78-unknown-elf.tar.gz -C ${{ runner.workspace }}
151+
- name: benchmark_builds-rl78
152+
run: |
153+
echo
154+
echo 'Add rl78-unknown-elf-g++ path'
155+
echo
156+
PATH="${{ runner.workspace }}/gcc-15.1.0-rl78-unknown-elf/bin:$PATH"
157+
echo 'Query avr-g++ version'
158+
echo
159+
rl78-unknown-elf-g++ -v
160+
echo
161+
echo 'Build avr benchmarks'
162+
echo
163+
./target/build/test_app_benchmarks_rl78.sh ${{ matrix.standard }}
164+
working-directory: ./ref_app/
111165
benchmark_builds-stm32f446:
112166
runs-on: ubuntu-latest
113167
defaults:
@@ -144,29 +198,6 @@ jobs:
144198
- name: benchmark_builds-stm32f446
145199
run: ./target/build/test_app_benchmarks_stm32f446.sh ${{ matrix.standard }}
146200
working-directory: ./ref_app/
147-
benchmark_builds-riscv:
148-
runs-on: ubuntu-latest
149-
defaults:
150-
run:
151-
shell: bash
152-
strategy:
153-
fail-fast: false
154-
matrix:
155-
standard: [ c++20 ]
156-
steps:
157-
- uses: actions/checkout@v4
158-
with:
159-
fetch-depth: '0'
160-
- name: update-tools
161-
run: |
162-
wget --no-check-certificate https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.2.0-3/xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz
163-
tar -xzf xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz -C ${{ runner.workspace }}
164-
working-directory: ./
165-
- name: benchmark_builds-riscv
166-
run: |
167-
PATH="${{ runner.workspace }}/xpack-riscv-none-elf-gcc-14.2.0-3/bin:$PATH"
168-
./target/build/test_app_benchmarks_riscv.sh ${{ matrix.standard }}
169-
working-directory: ./ref_app/
170201
benchmark_single-stm32f446:
171202
runs-on: ubuntu-latest
172203
defaults:

ref_app/src/app/benchmark/app_benchmark_boost_crypt_hasher.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ extern "C"
9898
}
9999
}
100100

101+
auto main() -> int;
102+
101103
auto main() -> int
102104
{
103105
auto result_is_ok = true;

ref_app/src/app/benchmark/app_benchmark_boost_math_cbrt_tgamma.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ auto app::benchmark::run_boost_math_cbrt_tgamma() -> bool
8989
}
9090

9191
#if defined(APP_BENCHMARK_STANDALONE_MAIN)
92+
auto main() -> int;
93+
9294
auto main() -> int
9395
{
9496
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MATH_CBRT_TGAMMA -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_boost_math_cbrt_tgamma.cpp -o ./ref_app/bin/app_benchmark_boost_math_cbrt_tgamma.exe

ref_app/src/app/benchmark/app_benchmark_boost_math_cyl_bessel_j.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ auto app::benchmark::run_boost_math_cbrt_cyl_bessel_j() -> bool
129129
}
130130

131131
#if defined(APP_BENCHMARK_STANDALONE_MAIN)
132+
auto main() -> int;
133+
132134
auto main() -> int
133135
{
134136
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MATH_CYL_BESSEL_J -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_boost_math_cyl_bessel_j.cpp -o ./ref_app/bin/app_benchmark_boost_math_cyl_bessel_j.exe

ref_app/src/app/benchmark/app_benchmark_boost_multiprecision_cbrt.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ auto app::benchmark::run_boost_multiprecision_cbrt() -> bool
9090
}
9191

9292
#if defined(APP_BENCHMARK_STANDALONE_MAIN)
93+
auto main() -> int;
94+
9395
auto main() -> int
9496
{
9597
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MULTIPRECISION_CBRT -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_boost_math_cbrt_tgamma.cpp -o ./ref_app/bin/app_benchmark_boost_multiprecision_cbrt.exe

ref_app/src/app/benchmark/app_benchmark_cnl_scaled_integer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ extern "C"
135135
}
136136
}
137137

138+
auto main() -> int;
139+
138140
auto main() -> int
139141
{
140142
auto result_is_ok = true;

ref_app/src/app/benchmark/app_benchmark_complex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ auto app::benchmark::run_complex() -> bool
3838
}
3939

4040
#if defined(APP_BENCHMARK_STANDALONE_MAIN)
41+
auto main() -> int;
42+
4143
auto main() -> int
4244
{
4345
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_COMPLEX -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_complex.cpp -o ./ref_app/bin/app_benchmark_complex.exe

ref_app/src/app/benchmark/app_benchmark_crc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ extern "C"
6767
}
6868
}
6969

70+
auto main() -> int;
71+
7072
auto main() -> int
7173
{
7274
auto result_is_ok = true;

ref_app/src/app/benchmark/app_benchmark_ecc_generic_ecc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ auto my_hardware_random_device_generator() -> unsigned int
212212
}
213213

214214
#if defined(APP_BENCHMARK_STANDALONE_MAIN)
215+
auto main() -> int;
216+
215217
auto main() -> int
216218
{
217219
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_ECC_GENERIC_ECC -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_hash.cpp -o ./ref_app/bin/app_benchmark_hash.exe

ref_app/src/app/benchmark/app_benchmark_fast_math.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ auto app::benchmark::run_fast_math() -> bool
4747
}
4848

4949
#if defined(APP_BENCHMARK_STANDALONE_MAIN)
50+
auto main() -> int;
51+
5052
auto main() -> int
5153
{
5254
// g++ -Wall -O3 -march=native -I./ref_app/src/mcal/host -I./ref_app/src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_FAST_MATH -DAPP_BENCHMARK_STANDALONE_MAIN ./ref_app/src/app/benchmark/app_benchmark_fast_math.cpp -o ./ref_app/bin/app_benchmark_fast_math.exe

0 commit comments

Comments
 (0)