diff --git a/ptxtools/alloy_ptxcc.sh b/ptxtools/alloy_ptxcc.sh deleted file mode 100755 index d98f8658..00000000 --- a/ptxtools/alloy_ptxcc.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -PTXCC=$ISPC_HOME/ptxtools/ptxcc -PTXGEN=$ISPC_HOME/ptxtools/ptxgen -ARGS=${@:2} -if [ "$NVVM" == "1" ]; -then - LLVM32=$HOME/usr/local/llvm/bin-3.2 - LLVMDIS=$LLVM32/bin/llvm-dis - $($LLVMDIS $1 -o $1.ll) && $($PTXGEN $1.ll -o $1.ptx) && \ - $($PTXCC $1.ptx -o $1.o -Xnvcc="-G") && \ - $(nvcc test_static_nvptx.cpp examples/nvcc_helpers.cu examples/ispc_malloc.cpp $1.o -arch=sm_35 -Iexamples/ -D_CUDA_ -lcudadevrt $ARGS); -else - $($PTXCC $1 -o $1.o -Xnvcc="-G") && \ - $(nvcc test_static_nvptx.cpp examples/nvcc_helpers.cu examples/ispc_malloc.cpp $1.o -arch=sm_35 -Iexamples/ -D_CUDA_ -lcudadevrt $ARGS); -fi - - - diff --git a/ptxtools/runtest_ptxcc.sh b/ptxtools/runtest_ptxcc.sh new file mode 100755 index 00000000..d1d64dbd --- /dev/null +++ b/ptxtools/runtest_ptxcc.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +PTXCC=$ISPC_HOME/ptxtools/ptxcc +PTXGEN=$ISPC_HOME/ptxtools/ptxgen +ARGS=${@:2} +TMPDIR=/tmp +fbname=`basename $1` +if [ "$NVVM" == "1" ]; +then + LLVM32=$HOME/usr/local/llvm/bin-3.2 + LLVMDIS=$LLVM32/bin/llvm-dis + $($LLVMDIS $1 -o $TMPDIR/$fbname.ll) && $($PTXGEN $TMPDIR/$fbname.ll -o $TMPDIR/$fbname.ptx) && \ + $($PTXCC $TMPDIR/$fbname.ptx -o $TMPDIR/$fbname.o -Xnvcc="-G") && \ + $(nvcc test_static_nvptx.cpp examples/nvcc_helpers.cu examples/ispc_malloc.cpp $TMPDIR/$fbname.o -arch=sm_35 -Iexamples/ -D_CUDA_ -lcudadevrt $ARGS); +else + $($PTXCC $1 -o $TMPDIR/$fbname.o -Xnvcc="-G") && \ + $(nvcc test_static_nvptx.cpp examples/nvcc_helpers.cu examples/ispc_malloc.cpp $TMPDIR/$fbname.o -arch=sm_35 -Iexamples/ -D_CUDA_ -lcudadevrt $ARGS); +fi + + + diff --git a/run_tests.py b/run_tests.py index 081c85b5..e9bc8e90 100755 --- a/run_tests.py +++ b/run_tests.py @@ -258,7 +258,7 @@ def run_test(testname): if should_fail: cc_cmd += " -DEXPECT_FAILURE" if is_nvptx_target: - nvptxcc_exe = "ptxtools/alloy_ptxcc.sh" + nvptxcc_exe = "ptxtools/runtest_ptxcc.sh" nvptxcc_exe_rel = add_prefix(nvptxcc_exe) cc_cmd = "%s %s -DTEST_SIG=%d -o %s" % \ (nvptxcc_exe_rel, obj_name, match, exe_name) @@ -297,7 +297,7 @@ def run_test(testname): basename = os.path.basename(filename) os.unlink("%s.pdb" % basename) os.unlink("%s.ilk" % basename) -# os.unlink(obj_name) + os.unlink(obj_name) except: None