Skip to content

Commit

Permalink
[SPEC2017] Use inputs from RUN directory.
Browse files Browse the repository at this point in the history
At the moment, some benchmarks use inputs from the INPUT/SRC directory.
Those are not copied to the device, if one is specified. To ensure the
input is available on device, use it from the RUN_* directories and use
speccpu2017_prepare_rundir to copy them to the run directory. This will
automatically copy them to the specified device as well.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D95360
  • Loading branch information
fhahn committed Jan 29, 2021
1 parent cc11972 commit 336185b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 24 deletions.
7 changes: 4 additions & 3 deletions External/SPEC/CFP2017rate/510.parest_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ speccpu2017_add_include_dirs(include .)
## test ########################################################################

speccpu2017_run_test(
"${INPUT_test_DIR}/test.prm"
"${RUN_test_DIR}/test.prm"
RUN_TYPE test
)

## train #######################################################################

speccpu2017_run_test(
"${INPUT_train_DIR}/train.prm"
"${RUN_train_DIR}/train.prm"
RUN_TYPE train
)

## ref #########################################################################

speccpu2017_run_test(
"${INPUT_ref_DIR}/ref.prm"
"${RUN_ref_DIR}/ref.prm"
RUN_TYPE ref
)

Expand Down Expand Up @@ -268,3 +268,4 @@ speccpu2017_add_executable(
source/libparest/slave/stationary/synthetic_data.cc
)
set_property(TARGET ${PROG} PROPERTY CXX_STANDARD 98)
speccpu2017_prepare_rundir()
7 changes: 4 additions & 3 deletions External/SPEC/CFP2017rate/538.imagick_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ link_libraries(-lm)
## test ########################################################################

speccpu2017_run_test(
-limit disk 0 "${INPUT_test_DIR}/test_input.tga" -shear 25 -resize 640x480
-limit disk 0 "${RUN_test_DIR}/test_input.tga" -shear 25 -resize 640x480
-negate -alpha Off test_output.tga
RUN_TYPE test
)
Expand All @@ -25,7 +25,7 @@ speccpu2017_validate_image(
## train #######################################################################

speccpu2017_run_test(
-limit disk 0 "${INPUT_train_DIR}/train_input.tga" -resize 320x240 -shear 31
-limit disk 0 "${RUN_train_DIR}/train_input.tga" -resize 320x240 -shear 31
-edge 140 -negate -flop -resize 900x900 -edge 10 train_output.tga
RUN_TYPE train
)
Expand All @@ -38,7 +38,7 @@ speccpu2017_validate_image(
## ref #########################################################################

speccpu2017_run_test(
-limit disk 0 "${INPUT_ref_DIR}/refrate_input.tga" -edge 41
-limit disk 0 "${RUN_ref_DIR}/refrate_input.tga" -edge 41
-resample 181% -emboss 31 -colorspace YUV -mean-shift 19x19+15%
-resize 30% refrate_output.tga
RUN_TYPE ref
Expand Down Expand Up @@ -153,3 +153,4 @@ speccpu2017_add_executable(
wand/wand.c
magick/deprecate.c
)
speccpu2017_prepare_rundir()
20 changes: 11 additions & 9 deletions External/SPEC/CINT2017rate/502.gcc_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,55 @@ add_compile_options(-fgnu89-inline)
## test ########################################################################

speccpu2017_run_test(
"${INPUT_test_DIR}/t1.c" -O3 -finline-limit=50000 -o t1.opts-O3_-finline-limit_50000.s
"${RUN_test_DIR}/t1.c" -O3 -finline-limit=50000 -o t1.opts-O3_-finline-limit_50000.s
RUN_TYPE test
)

## train #######################################################################

speccpu2017_run_test(
"${INPUT_train_DIR}/200.c" -O3 -finline-limit=50000 -o 200.opts-O3_-finline-limit_50000.s
"${RUN_train_DIR}/200.c" -O3 -finline-limit=50000 -o 200.opts-O3_-finline-limit_50000.s
RUN_TYPE train
)

speccpu2017_run_test(
"${INPUT_train_DIR}/scilab.c" -O3 -finline-limit=50000 -o scilab.opts-O3_-finline-limit_50000.s
"${RUN_train_DIR}/scilab.c" -O3 -finline-limit=50000 -o scilab.opts-O3_-finline-limit_50000.s
RUN_TYPE train
)

speccpu2017_run_test(
"${INPUT_train_DIR}/train01.c" -O3 -finline-limit=50000 -o train01.opts-O3_-finline-limit_50000.s
"${RUN_train_DIR}/train01.c" -O3 -finline-limit=50000 -o train01.opts-O3_-finline-limit_50000.s
RUN_TYPE train
)

## ref #########################################################################

speccpu2017_run_test(
"${INPUT_ref_DIR}/gcc-pp.c" -O3 -finline-limit=0 -fif-conversion -fif-conversion2 -o gcc-pp.opts-O3_-finline-limit_0_-fif-conversion_-fif-conversion2.s
"${RUN_ref_DIR}/gcc-pp.c" -O3 -finline-limit=0 -fif-conversion -fif-conversion2 -o gcc-pp.opts-O3_-finline-limit_0_-fif-conversion_-fif-conversion2.s
RUN_TYPE ref
SUITE_TYPE rate
)

speccpu2017_run_test(
"${INPUT_ref_DIR}/gcc-pp.c" -O2 -finline-limit=36000 -fpic -o gcc-pp.opts-O2_-finline-limit_36000_-fpic.s
"${RUN_ref_DIR}/gcc-pp.c" -O2 -finline-limit=36000 -fpic -o gcc-pp.opts-O2_-finline-limit_36000_-fpic.s
RUN_TYPE ref
SUITE_TYPE rate
)

speccpu2017_run_test(
"${INPUT_ref_DIR}/gcc-smaller.c" -O3 -fipa-pta -o gcc-smaller.opts-O3_-fipa-pta.s
"${RUN_ref_DIR}/gcc-smaller.c" -O3 -fipa-pta -o gcc-smaller.opts-O3_-fipa-pta.s
RUN_TYPE ref
SUITE_TYPE rate
)

speccpu2017_run_test(
"${INPUT_ref_DIR}/ref32.c" -O5 -o ref32.opts-O5.s
"${RUN_ref_DIR}/ref32.c" -O5 -o ref32.opts-O5.s
RUN_TYPE ref
SUITE_TYPE rate
)

speccpu2017_run_test(
"${INPUT_ref_DIR}/ref32.c" -O3 -fselective-scheduling -fselective-scheduling2 -o ref32.opts-O3_-fselective-scheduling_-fselective-scheduling2.s
"${RUN_ref_DIR}/ref32.c" -O3 -fselective-scheduling -fselective-scheduling2 -o ref32.opts-O3_-fselective-scheduling_-fselective-scheduling2.s
RUN_TYPE ref
SUITE_TYPE rate
)
Expand Down Expand Up @@ -458,3 +458,5 @@ speccpu2017_add_executable(
mini-gmp.c
spec_qsort/spec_qsort.c
)

speccpu2017_prepare_rundir()
7 changes: 4 additions & 3 deletions External/SPEC/CINT2017rate/505.mcf_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ speccpu2017_add_include_dirs(spec_qsort)
## test ########################################################################

speccpu2017_run_test(
"${INPUT_test_DIR}/inp.in"
"${RUN_test_DIR}/inp.in"
STDOUT inp.out
RUN_TYPE test
)

## train #######################################################################

speccpu2017_run_test(
"${INPUT_train_DIR}/inp.in"
"${RUN_train_DIR}/inp.in"
STDOUT inp.out
RUN_TYPE train
)

## ref #########################################################################

speccpu2017_run_test(
"${INPUT_ref_DIR}/inp.in"
"${RUN_ref_DIR}/inp.in"
STDOUT inp.out
RUN_TYPE ref
)
Expand All @@ -36,3 +36,4 @@ speccpu2017_run_test(

speccpu2017_verify_output()
speccpu2017_add_executable()
speccpu2017_prepare_rundir()
7 changes: 4 additions & 3 deletions External/SPEC/CINT2017rate/531.deepsjeng_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ endif ()
## test ########################################################################

speccpu2017_run_test(
"${INPUT_test_DIR}/test.txt"
"${RUN_test_DIR}/test.txt"
STDOUT test.out
RUN_TYPE test
)

## train #######################################################################

speccpu2017_run_test(
"${INPUT_train_DIR}/train.txt"
"${RUN_train_DIR}/train.txt"
STDOUT train.out
RUN_TYPE train
)

## ref #########################################################################

speccpu2017_run_test(
"${INPUT_ref_DIR}/ref.txt"
"${RUN_ref_DIR}/ref.txt"
STDOUT ref.out
RUN_TYPE ref
)
Expand All @@ -38,3 +38,4 @@ speccpu2017_run_test(

speccpu2017_verify_output()
speccpu2017_add_executable()
speccpu2017_prepare_rundir()
7 changes: 4 additions & 3 deletions External/SPEC/CINT2017rate/541.leela_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ speccpu2017_add_include_dirs(.)
## test ########################################################################

speccpu2017_run_test(
"${INPUT_test_DIR}/test.sgf"
"${RUN_test_DIR}/test.sgf"
STDOUT test.out
RUN_TYPE test
)

## train #######################################################################

speccpu2017_run_test(
"${INPUT_train_DIR}/train.sgf"
"${RUN_train_DIR}/train.sgf"
STDOUT train.out
RUN_TYPE train
)

## ref #########################################################################

speccpu2017_run_test(
"${INPUT_ref_DIR}/ref.sgf"
"${RUN_ref_DIR}/ref.sgf"
STDOUT ref.out
RUN_TYPE ref
)
Expand All @@ -36,3 +36,4 @@ speccpu2017_run_test(

speccpu2017_verify_output()
speccpu2017_add_executable()
speccpu2017_prepare_rundir()

0 comments on commit 336185b

Please sign in to comment.