how to create a cuda shared library used in python -


i have created c shared library used in python works when test it. compile this:

 gcc -shared -std=c99 -i/usr/include/python2.6 -fpic -lpython2.6 -opymod.so pymod.c 

i have cuda source code "pymod.cu" same "pymod.c" , don't know how compile nvcc.

thank in advance.

you need first compile using nvcc, build shared library using gcc:

nvcc -c test.cu -o test.o -xcompiler -fpic  gcc -shared -fpic -o libtest.so test.o 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -