a fix for .b0 ptx and some other code improvements

This commit is contained in:
Evghenii
2014-01-27 08:51:05 +01:00
parent 52691fbb52
commit 1c2dbd6a27
5 changed files with 40 additions and 22 deletions

View File

@@ -29,6 +29,7 @@ TAB [\t]*
".visible" { return TOKEN_VISIBLE; }
".global" { return TOKEN_GLOBAL; }
".param" { return TOKEN_PARAM; }
".b0" { LLSETTOKEN( TOKEN_B32);} /* fix for buggy llvm-ptx generator */
".b8" { LLSETTOKEN( TOKEN_B8);}
".b16" { LLSETTOKEN( TOKEN_B16);}
".b32" { LLSETTOKEN( TOKEN_B32);}

View File

@@ -1,6 +1,6 @@
#!/bin/sh
PTXSRC=$1
PTXSRC=$1__tmp_ptx.ptx
PTXCU=$1___tmp_ptx.cu
PTXSH=$1___tmp_ptx.sh
@@ -9,6 +9,7 @@ NVCCPARM=${@:2}
DEPTX=dePTX
NVCC=nvcc
$(cat $1 | sed 's/\.b0/\.b32/g' > $PTXSRC) &&
$DEPTX < $PTXSRC > $PTXCU &&
$NVCC -arch=sm_35 -G -dc $NVCCPARM -dryrun $PTXCU 2>&1 | \
sed 's/\#\$//g'| \