cuBLAS 5.5

Hi,
I’m testing new CUDA 5.5 features and now I’m testing cublas static library vs cublas dynamic library (libcublas_device.a vs libcublas.so). I want to use the matrixMulCUBLAS SDK sample but I would like to know how I can be sure that I’m using the correct library.
I know that you can change the cudart library using the compiler option -cudart=shared/static, but if I compile the code using -lcublas_device -lcublas (like cdpLUDecomposition sdk sample) What library is used?

Thanks

You should be able to double check on how the binary was built by running ldd on it. ldd will show dependencies on dynamic libraries. If you do not see libcublas.so in the output from ldd your app was linked against the static version of CUBLAS.

Thanks!!

The libcublas_device.a static library only contains the device interface to CUBLAS–i.e., functions that run on the GPU and that can be called from kernels using CUDA Dynamic Parallelism. This is supported on sm_3.5. There is no shared library equivalent for the device interface. This was newly introduced in CUDA 5.0. This is documented here: http://docs.nvidia.com/cuda/cublas/index.html#topic_3_7.

The interface to call CUBLAS from the host has always been provided in cublas.so. There is no static library equivalent for the host interface.

This section of the release notes lists the purpose of each of the libraries in the toolkit: http://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#linux-lib-files