File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- export SPACK_COMPILER_WRAPPER_PATH=" $PWD "
3+ SCRIPT_DIR=$( CDPATH=' ' cd -- " $( dirname -- " $0 " ) " && pwd)
4+ REPO_DIR=$( CDPATH=' ' cd -- " $SCRIPT_DIR /.." && pwd)
5+ CC_SH=" $REPO_DIR /cc.sh"
6+
7+ if [ ! -f " $CC_SH " ]; then
8+ echo " Cannot find cc.sh at $CC_SH " >&2
9+ exit 1
10+ fi
11+
12+ export SPACK_COMPILER_WRAPPER_PATH=" $SCRIPT_DIR "
413export SPACK_DEBUG_LOG_DIR=" /tmp"
514export SPACK_DEBUG_LOG_ID=" bench"
615export SPACK_SHORT_SPEC=" py-torch@2.11.0%gcc@14.2.0 arch=linux-ubuntu24.04-aarch64"
@@ -85,14 +94,14 @@ export SPACK_COMPILER_FLAGS_KEEP=""
8594export SPACK_COMPILER_FLAGS_REPLACE=" "
8695
8796# Warmup
88- . /g++ -c foo.c -o foo.o
97+ " $SCRIPT_DIR /g++" -c foo.c -o foo.o
8998
9099# Do a 1000 runs
91100N=1000
92101_start=$( date +%s)
93102_i=0
94103while [ $_i -lt $N ]; do
95- . /g++ -c foo.c -o foo.o
104+ " $SCRIPT_DIR /g++" -c foo.c -o foo.o
96105 _i=$(( _i + 1 ))
97106done
98107_end=$( date +%s)
You can’t perform that action at this time.
0 commit comments