some code cleanup
This commit is contained in:
21
ptxtools/runtest_ptxcc.sh
Executable file
21
ptxtools/runtest_ptxcc.sh
Executable file
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user