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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -