combination of CUDA and CUBLAS

Hi all,

Does anybody know if it is possible to use CUBLAS functions (such as cublasSgemm) in a cuda file (i.e a file with extension of .cu)?

I tried it, by adding the #include “cublas.h” into the my cuda program, but it gives this error message: “unresolved external symbol cublasInit referenced in function main”
I wanted to know if anybody has done this before? I appreciate any suggestions or helps…

did you add -lcublas to your nvcc command?

I am using VS 2005, and I added (typed) the cublas.lib in the project property/configuration properties/linker/Input—> Additional Dependencies

It seems it is working now! :D