代码拉取完成,页面将自动刷新
同步操作将从 锦轩/swcodegen 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
keep=no
verbose=no
for option; do
case "$option" in
--keep)
keep=yes
;;
--verbose)
verbose=yes
;;
esac
done
EXEEXT=@EXEEXT@
DIR=@POLYBENCH_DIR@
VERSION=@GIT_HEAD_VERSION@
SIZE=-DMINI_DATASET
CC="@CC@"
HAVE_OPENCL=@HAVE_OPENCL@
HAVE_OPENMP=@HAVE_OPENMP@
srcdir="@srcdir@"
if [ $keep = "yes" ]; then
OUTDIR="out.$VERSION"
mkdir "$OUTDIR" || exit 1
else
if test "x$TMPDIR" = "x"; then
TMPDIR=/tmp
fi
OUTDIR=`mktemp -d $TMPDIR/ppcg.XXXXXXXXXX` || exit 1
fi
CPPFLAGS="-DPOLYBENCH_USE_C99_PROTO -DPOLYBENCH_DUMP_ARRAYS"
CPPFLAGS="$CPPFLAGS $SIZE -I $DIR/utilities"
CFLAGS="-lm --std=gnu99"
echo "Running tests in folder ${OUTDIR}"
run_tests () {
ext=$1
ppcg_options=$2
cc_options=$3
if [ "x$ppcg_options" = "x" ]; then
ppcg_option_str="none"
else
ppcg_option_str=$ppcg_options
fi
if [ "x$cc_options" = "x" ]; then
cc_option_str="none"
else
cc_option_str=$cc_options
fi
echo Test: $ext, ppcg options: $ppcg_option_str, CC options: $cc_option_str
for i in `cat $DIR/utilities/benchmark_list`; do
echo $i
name=`basename $i`
name=${name%.c}
source_opt="${OUTDIR}/$name.$ext.c"
prog_orig=${OUTDIR}/$name.orig${EXEEXT}
prog_opt=${OUTDIR}/$name.$ext${EXEEXT}
output_orig=${OUTDIR}/$name.orig.out
output_opt=${OUTDIR}/$name.$ext.out
dir=`dirname $i`
if [ $verbose = "yes" ]; then
echo ./ppcg$EXEEXT -I $DIR/$dir $DIR/$i \
$CPPFLAGS -o $source_opt $ppcg_options
fi
./ppcg$EXEEXT -I $DIR/$dir $DIR/$i $CPPFLAGS \
-o $source_opt $ppcg_options || exit
$CC -I $DIR/$dir $CPPFLAGS $DIR/$i -o $prog_orig \
$DIR/utilities/polybench.c $CFLAGS
$prog_orig 2> $output_orig
if [ $verbose = "yes" ]; then
echo $CC -I $DIR/$dir $CPPFLAGS $source_opt \
-o $prog_opt $DIR/utilities/polybench.c \
$CFLAGS $cc_options
fi
$CC -I $DIR/$dir $CPPFLAGS $source_opt -o $prog_opt \
$DIR/utilities/polybench.c $CFLAGS $cc_options || exit
$prog_opt 2> $output_opt || exit
cmp $output_orig $output_opt || exit
done
}
run_tests ppcg "--target=c --tile"
run_tests ppcg_live "--target=c --no-live-range-reordering --tile"
# Test OpenMP code, if compiler supports openmp
if [ $HAVE_OPENMP = "yes" ]; then
run_tests ppcg_omp "--target=c --openmp" -fopenmp
echo Introduced `grep -R 'omp parallel' "${OUTDIR}" | wc -l` '"pragma omp parallel for"'
else
echo Compiler does not support OpenMP. Skipping OpenMP tests.
fi
if [ $HAVE_OPENCL = "yes" ]; then
run_tests ppcg_opencl "--target=opencl --opencl-no-use-gpu" \
"-I $srcdir $srcdir/ocl_utilities.c -lOpenCL"
fi
if [ $keep = "no" ]; then
rm -r "${OUTDIR}"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。