Skip to content

Commit d7beca5

Browse files
authored
lower cpu target to broadwell (hanabi1224#198)
* lower cpu target to broadwell * node version
1 parent 98cb401 commit d7beca5

File tree

11 files changed

+17
-27
lines changed

11 files changed

+17
-27
lines changed

.github/workflows/bench.yml

+3
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ jobs:
233233
os: [ubuntu-20.04]
234234
steps:
235235
- uses: actions/checkout@v2
236+
- uses: actions/setup-node@v2
237+
with:
238+
node-version: 14.x
236239
- uses: actions/download-artifact@v2
237240
with:
238241
# Artifact name

.github/workflows/site.yml

-16
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,9 @@ jobs:
1616
- uses: actions/setup-node@v2
1717
with:
1818
node-version: 14.x
19-
- name: Install
20-
run: |
21-
npm install --global yarn
22-
yarn --version
23-
yarn global bin
24-
docker info
2519
- name: Build
2620
run: |
2721
pushd website
2822
yarn
2923
yarn build
3024
popd
31-
32-
33-
34-
35-
36-
37-
38-
39-
40-

bench/bench_chapel.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ environments:
3737
docker: chapel/chapel
3838
include: chapel
3939
include_sub_dir: src
40-
build: mason build --release --show --static --ccflags -march=skylake
40+
build: mason build --release --show --static --ccflags -march=broadwell
4141
after_build:
4242
- cp target/release/app out
4343
out_dir: out

bench/bench_fortran.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ environments:
2828
version: 10
2929
docker:
3030
include:
31-
build: gfortran-10 -O3 -march=skylake -fomit-frame-pointer -fopenmp -lpthread -lgmp -o out/app app.f90
31+
build: gfortran-10 -O3 -march=broadwell -fomit-frame-pointer -fopenmp -lpthread -lgmp -o out/app app.f90
3232
out_dir: out
3333
run_cmd: app
3434
- os: linux
@@ -37,6 +37,6 @@ environments:
3737
version: 7
3838
docker:
3939
include:
40-
build: flang -O3 -march=skylake -fopenmp -L/usr/lib/llvm-7/lib/ -fopenmp-simd -lgmp -o out/app app.f90
40+
build: flang -O3 -march=broadwell -fopenmp -L/usr/lib/llvm-7/lib/ -fopenmp-simd -lgmp -o out/app app.f90
4141
out_dir: out
4242
run_cmd: app

bench/bench_rust.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ environments:
7070
# - /tmp/rs/target:/tmp/rs/target
7171
# - /tmp/.cargo/registry:/usr/local/cargo/registry
7272
env:
73-
RUSTFLAGS: -Ctarget-cpu=skylake
73+
RUSTFLAGS: -Ctarget-cpu=broadwell
7474
include: rust
7575
include_sub_dir: src
7676
build: cargo +stable build --release --target-dir /tmp/rs/target -v

bench/bench_rust_nightly.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ environments:
2626
compiler: rustc
2727
version: nightly
2828
env:
29-
RUSTFLAGS: -Ctarget-cpu=skylake
29+
RUSTFLAGS: -Ctarget-cpu=broadwell
3030
include: rust-nightly
3131
include_sub_dir: src
3232
build: cargo +nightly build --release --target-dir /tmp/rsn/target -v

bench/bench_zig.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ environments:
4343
version: latest
4444
docker:
4545
include: zig
46-
build: zig build -Dcpu=skylake --verbose-llvm-cpu-features
46+
build: zig build -Dcpu=broadwell --verbose-llvm-cpu-features
4747
out_dir: out
4848
run_cmd: app

bench/include/c/app.rsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-pipe -Wall -O3 -fomit-frame-pointer -march=skylake -fopenmp -pthread -lapr-1 -I/usr/include/apr-1.0 -o app app.c -lm
1+
-pipe -Wall -O3 -fomit-frame-pointer -march=broadwell -fopenmp -pthread -lapr-1 -I/usr/include/apr-1.0 -o app app.c -lm

bench/include/cpp/app.rsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-pipe -Wall -O3 -fomit-frame-pointer -march=skylake -std=c++20 -static-libstdc++ -fopenmp -pthread -o app app.cpp
1+
-pipe -Wall -O3 -fomit-frame-pointer -march=broadwell -std=c++20 -static-libstdc++ -fopenmp -pthread -o app app.cpp

bench/include/ocaml/dune

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
100
88
-O3
99
-cc
10-
"gcc -pipe -Wall -O3 -fomit-frame-pointer -march=skylake -fopenmp"
10+
"gcc -pipe -Wall -O3 -fomit-frame-pointer -march=broadwell -fopenmp"
1111
-nodynlink
1212
-noassert
1313
-unsafe

bench/tool/Program.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ public static async Task Main(
105105
if (cpuInfo != null)
106106
{
107107
Logger.Info(cpuInfo.ToString());
108-
if (GithubActionUtils.IsGithubBuild && task == TaskBench && cpuInfo.Model < 80)
108+
if (GithubActionUtils.IsGithubBuild && task == TaskBench && cpuInfo.Model < 79)
109109
{
110-
throw new Exception("[github action] Fail intentionally on old cpu model prior to skylake, please retry.");
110+
// To print cpu features, use
111+
// either: 'rustc +nightly --print=cfg -C target-cpu=broadwell' (features like avx512 are missing from stable)
112+
// or 'zig build -Dcpu=broadwell --verbose-llvm-cpu-features'
113+
throw new Exception("[github action] Fail intentionally on old cpu model prior to broadwell, please retry.");
111114
}
112115
}
113116

0 commit comments

Comments
 (0)