21 lines
708 B
Bash
Executable File
21 lines
708 B
Bash
Executable File
#!/bin/sh
|
|
|
|
PATH=$ISPC_HOME/examples_ptx/ptxcc:$ISPC_HOME/examples_ptx/ptxgen:$PATH
|
|
PTXCC=ptxcc
|
|
ARGS=${@:2}
|
|
if [ "$NVVM" == "1" ];
|
|
then
|
|
LLVM32=$HOME/usr/local/llvm/bin-3.2
|
|
LLVMDIS=$LLVM32/bin/llvm-dis
|
|
PTXGEN=$ISPC_HOME/examples_ptx/ptxgen/ptxgen
|
|
$($LLVMDIS $1 -o $1.ll) && $($PTXGEN $1.ll > $1.ptx) && \
|
|
$($PTXCC $1.ptx -o $1.o -Xnvcc="-G") && \
|
|
$(nvcc test_static_nvptx.cpp examples_ptx/nvcc_helpers.cu examples_ptx/ispc_malloc.cpp $1.o -arch=sm_35 -Iexamples_ptx/ -D_CUDA_ -lcudadevrt $ARGS);
|
|
else
|
|
$($PTXCC $1 -o $1.o -Xnvcc="-G") && \
|
|
$(nvcc test_static_nvptx.cpp examples_ptx/nvcc_helpers.cu examples_ptx/ispc_malloc.cpp $1.o -arch=sm_35 -Iexamples_ptx/ -D_CUDA_ -lcudadevrt $ARGS);
|
|
fi
|
|
|
|
|
|
|