CuBLAS documentation doesn't match the current implementation

I’m working with CUDA 7.5. I’ve got CUDA working with VS2013, now I want to get CuBLAS working.

I’m referring to the CuBlAS documentation here and the sample code provided.

This shows a kernel which uses the vector scale function thus:
cublasSscal (handle, n-p+1, &alpha, &m[IDX2F(p,q,ldm)], ldm);

However when I try to run this code I get an error because the cublasSscal function in the version of the CuBLAS library which ships with CUDA 7.5 appears to take different function parameters:

void CUBLASWINAPI cublasSscal (int n, float alpha, float *x, int incx);

It appears the handle has gone from all these functions? I can’t find current documentation explaining this. Please can someone point me in the direction of a working example?

My ultimate aim is to use CAFFE to do image classification in a windows application but I want to make sure I understand and can use each of the underlying components first.

There are two cublas APIs. The legacy API does not use handles. This difference is discussed in the documentation. There are probably some other differences as well.

The example code you’re referring to (and what you should be using) is the cublas v2 api. You’ll note that that sample code has:

#include "cublas_v2.h"

That should be the only header file you include to access the “normal” CUBLAS v2 API.

The “normal” cublas_v2.h api takes a handle. Beyond that you seem to be confusing “running” a code and “compiling” a code. The mismatch you are describing would show up at compile time.

If you have installed CUDA 7.5, there are a number of working CUBLAS codes in the sample projects.