Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,16 @@ target_include_directories(252.eon PRIVATE
target_compile_options(252.eon PRIVATE
-DSPEC_CPU2000_LP64 -DUSE_STRERROR -Wno-register)

target_link_options(252.eon PRIVATE
--rtlib=compiler-rt)

target_link_libraries(252.eon PRIVATE
c++
m)

if (ANDROID_WASM)
target_link_libraries(252.eon PRIVATE
clang_rt.builtins)
endif()
#if (ANDROID_WASM)
# target_link_libraries(252.eon PRIVATE
# clang_rt.builtins)
#endif()

add_executable(255.vortex
${SPEC_255_VORTEX_PATH}/bitvec.c
Expand Down
7 changes: 7 additions & 0 deletions all-progs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gzip c
vpr c
mcf c
parser c
eon c++
vortex c
bzip2 c
53 changes: 53 additions & 0 deletions push-all
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/sh

need_libcxx=false
dst=/data/local/tmp

adb shell rm -rf $dst/run
adb push run $dst >/dev/null

progs=
need_libcxx=false
while read p lang; do
progs="${progs} ${p}"
if [ $lang = c++ ]; then
need_libcxx=true
fi
done <all-progs

for p in $progs; do
echo -n $p...
if [ -r build_wasm/$p ]; then
echo -n wasm...
adb push build_wasm/$p $dst/$p >/dev/null
np=build_native/*.$p
if [ -r $np ]; then
echo -n native...
adb push $np $dst/$p-native >/dev/null
fi
pg=$p.pfg
if [ -r build_wasm/$pg ]; then
echo -n profgen...
adb push build_wasm/$pg $dst/$pg >/dev/null
fi
pgo=$p.pgo
if [ -r build_wasm/$pgo ]; then
echo -n pgo...
adb push build_wasm/$pgo $dst/$pgo >/dev/null
fi
echo -n data...
adb shell rm -rf $dst/$p.data
adb push benchspec/CINT2000/*.$p/data $dst/$p.data >/dev/null
echo done.
else
echo skipped.
fi
done

if [ $need_libcxx = true ]; then
echo libc++...
adb push \
$ANDROID_CLANG_TOOLCHAIN/android_libc++/ndk/aarch64/lib/libc++_shared.so \
$dst/libc++_shared.so >/dev/null
echo done.
fi
58 changes: 58 additions & 0 deletions run/run.bzip2
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

p=bzip2
verify=no
iter=2
t=test

while [ $# -gt 0 ]; do
case $1 in
--native)
p=${p}-native
;;
--verify)
verify=yes
;;
--profgen)
p=${p}.pfg
;;
--pgo)
p=${p}.pgo
;;
test)
t=test
iter=2
;;
train)
t=train
iter=8
;;
ref)
t=ref
iter=58
;;
*)
echo Unknown argument $1.
exit 1
;;
esac
shift
done

rm -f *.out

echo Running $p on corpus $t with $iter iterations...
for f in bzip2.data/$t/input/input.*; do
bf=`basename $f`
printf '%-20s: ' $bf
time ./$p $f $iter >$bf.out 2>stderr.$bf.out
done

if [ $verify = yes ]; then
echo VERIFY
for o in input.*.out; do
cmp $o bzip2.data/$t/output/$o
done
fi

echo OK
58 changes: 58 additions & 0 deletions run/run.gzip
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

p=gzip
verify=no
iter=2
t=test

while [ $# -gt 0 ]; do
case $1 in
--native)
p=${p}-native
;;
--verify)
verify=yes
;;
--profgen)
p=${p}.pfg
;;
--pgo)
p=${p}.pgo
;;
test)
t=test
iter=2
;;
train)
t=train
iter=32
;;
ref)
t=ref
iter=60
;;
*)
echo Unknown argument $1.
exit 1
;;
esac
shift
done

rm -f *.out

echo Running $p on corpus $t with $iter iterations...
for f in gzip.data/$t/input/input.*; do
bf=`basename $f`
printf '%-20s: ' $bf
time ./$p $f $iter >$bf.out 2>stderr.$bf.out
done

if [ $verify = yes ]; then
echo VERIFY
for o in input.*.out; do
cmp $o gzip.data/$t/output/$o
done
fi

echo OK
43 changes: 43 additions & 0 deletions run/run.mcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/sh

p=mcf
verify=no
t=test

while [ $# -gt 0 ]; do
case $1 in
--native)
p=${p}-native
;;
--verify)
verify=yes
;;
--profgen)
p=${p}.pfg
;;
--pgo)
p=${p}.pgo
;;
test|train|ref)
t=$1
;;
*)
echo Unknown argument $1.
exit 1
;;
esac
shift
done

rm -f *.out

echo Running $p on corpus $t...
time ./$p mcf.data/$t/input/inp.in >stdout.out 2>stderr.out

if [ $verify = yes ]; then
echo VERIFY
cmp stdout.out mcf.data/$t/output/inp.out
cmp mcf.out mcf.data/$t/output/mcf.out
fi

echo OK
48 changes: 48 additions & 0 deletions run/run.parser
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

p=parser
verify=no
t=test

while [ $# -gt 0 ]; do
case $1 in
--native)
p=${p}-native
;;
--verify)
verify=yes
;;
--profgen)
p=${p}.pfg
;;
--pgo)
p=${p}.pgo
;;
test|train|ref)
t=$1
;;
*)
echo Unknown argument $1.
exit 1
;;
esac
shift
done

rm -f *.out
rm -rf 2.1.dict words
cp parser.data/all/input/2.1.dict 2.1.dict
cp -r parser.data/all/input/words words

echo Running $p on corpus $t...
time ./$p 2.1.dict -batch \
<parser.data/$t/input/$t.in >stdout.out 2>stderr.out

if [ $verify = yes ]; then
echo VERIFY
diff stdout.out parser.data/$t/output/$t.out
fi

rm -rf 2.1.dict words

echo OK
58 changes: 58 additions & 0 deletions run/run.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

ARGS1="-nodisp -place_only -init_t 5 -exit_t 0.005 -alpha_t 0.9412 -inner_num 2"
ARGS2="-nodisp -route_only -route_chan_width 15 -pres_fac_mult 2"
ARGS2="${ARGS2} -acc_fac 1 -first_iter_pres_fac 4 -initial_pres_fac 8"

p=vpr
verify=no
t=test

while [ $# -gt 0 ]; do
case $1 in
--native)
p=${p}-native
;;
--verify)
verify=yes
;;
--profgen)
p=${p}.pfg
;;
--pgo)
p=${p}.pgo
;;
test|train|ref)
t=$1
;;
*)
echo Unknown argument $1.
exit 1
;;
esac
shift
done

rm -f *.in
rm -f *.out
rm -f test*

cp vpr.data/$t/input/* .

echo Running $p...
echo -n "place: "
time ./$p net.in arch.in place.out dum.out ${ARGS1} >place_log.out 2>stderr1.out
echo -n "route: "
time ./$p net.in arch.in place.in route.out ${ARGS2} >route_log.out 2>stderr2.out

if [ $verify = yes ]; then
echo VERIFY
for i in place_log.out route_log.out costs.out route.out; do
if ! diff $i vpr.data/$t/output/$i ; then
echo ""
echo "Diff in $i might be within the tolerance"
fi
done
fi

echo OK
13 changes: 0 additions & 13 deletions wasm-to-bin

This file was deleted.

Loading