I used cublasSdot to compute the dot product “dp” of two vectors x and y, and tried to save it in device memory. However, when I copied “dp” from device memory to host memory, its value was always 0. If I saved “dp” in host memory directly, the result was correct. If “dp” was in host memory, I think saxpy which needs “dp” may be slow since it must get “dp” from host memory. Is my understanding right? Thanks in advance.
I am calling cublasSdot inside the kernel but the code just hangs. Everything else like cublasinit, creating vector onto the device, etc. is correct…I can print correct values too. I tried taking the return value in the __device __ variable too but no success.