Skip to content

Commit cf5322a

Browse files
committed
support PTX loading on CUDA 7.5
This is a pretty huge hack right now. It basically lies about the nvcc compiler version if you compile with CUDA 8. However, it works. More investigation is warranted.
1 parent e2a592f commit cf5322a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ kernels32.go: kernels32.cu
55
echo 'package cudavec' >$@
66
echo '' >>$@
77
echo 'var kernels32PTX = `' >>$@
8-
cat kernels32.ptx >>$@
8+
cat kernels32.ptx | sed -E 's/.version 5\../.version 4.3/' >>$@
99
echo '`' >>$@
1010
rm kernels32.ptx
1111

kernels32.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var kernels32PTX = `
99
// Based on LLVM 3.4svn
1010
//
1111
12-
.version 5.0
12+
.version 4.3
1313
.target sm_30
1414
.address_size 64
1515

0 commit comments

Comments
 (0)