You need to set the pointer mode to device before the second call to cublasSasum:
cublasSetPointerMode(cublas_handle, CUBLAS_POINTER_MODE_DEVICE);
res=10.000000
d_res=10.000000
You need to set the pointer mode to device before the second call to cublasSasum:
cublasSetPointerMode(cublas_handle, CUBLAS_POINTER_MODE_DEVICE);
res=10.000000
d_res=10.000000
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| The process of cublasSasum_v2 make errors when the output is on device memories | 3 | 872 | April 30, 2018 | |
| cublasDasum with device result | 1 | 2125 | April 13, 2012 | |
| Must the result of cublasSdot be host variable? | 4 | 1385 | October 20, 2016 | |
| How to pass variable in device memory into CUBLAS function | 0 | 2917 | May 20, 2010 | |
| scalar operation on device | 3 | 4104 | June 3, 2016 | |
| Cublas, sum and dot. Newbie question. | 6 | 5679 | November 29, 2012 | |
| cublas cublasSdot can't work with As described Documentation | 0 | 529 | August 29, 2018 | |
| Manipulate a single element in cublas matrix | 8 | 2533 | November 12, 2009 | |
| Cublas saxpy error | 20 | 1575 | October 21, 2021 | |
| Error using cublas on OpenACC | 4 | 671 | April 18, 2023 |