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
Post a Comment