syoon
1
I already defined arrays in device using “cudaMalloc” then do i need to “cublaAlloc” again so that cublas can use array in device?
if so, i defined
cudaMalloc((void **) &cost_d, sizeof(REAL)*itotal2)
what is corresponding commands of cublaAlloc?
cublasAlloc(itotal2, sizeof(REAL)itotal2, (void*) &cost_d)
is this correct?
Thanks in advance.
YDD
2
No. cublasAlloc is just a wrapper around cudaMalloc. Just pass the cudaMalloc pointers straight into the CUBLAS calls.
YDD
3
No. cublasAlloc is just a wrapper around cudaMalloc. Just pass the cudaMalloc pointers straight into the CUBLAS calls.
YDD is right, cubasAlloc is just a wrapper around cudaMalloc.
Also cublasSetMatrix/cubasGetMatrix cublasSetVector/cublasGetVector are just wrappers around cudaMemcpy or cudaMemcpy2D
YDD is right, cubasAlloc is just a wrapper around cudaMalloc.
Also cublasSetMatrix/cubasGetMatrix cublasSetVector/cublasGetVector are just wrappers around cudaMemcpy or cudaMemcpy2D
YDD is right, cubasAlloc is just a wrapper around cudaMalloc.
Also cublasSetMatrix/cubasGetMatrix cublasSetVector/cublasGetVector are just wrappers around cudaMemcpy or cudaMemcpy2D