CUBLAS handle
4 posts
• Page 1 of 1
CUBLAS handle
Where can I get CUBLAS handle in CULA with CUDA 5.0? Previously, i use cublasGetCurrentCtx function, but now it is not available.
- VictorGre1
- CULA Premium
- Posts: 10
- Joined: Sat Nov 28, 2009 10:37 am
Re: CUBLAS handle
I don't believe there's a way to get to the CUBLAS handle. CULA doesn't offer an API function for it, and we likely won't, owing to needing to document the precise lifetime of the handle.
If you just need a CUBLAS handle, it would be safe to create your own. My guess, though, is that you're looking for the handle to call the cublasGetStream function on it - and I would strongly advise against doing so, because any stream returned from here will likely have been destroyed by CULA by the time you retrieve it.
If you just need a CUBLAS handle, it would be safe to create your own. My guess, though, is that you're looking for the handle to call the cublasGetStream function on it - and I would strongly advise against doing so, because any stream returned from here will likely have been destroyed by CULA by the time you retrieve it.
- john
- Administrator
- Posts: 587
- Joined: Thu Jul 23, 2009 2:31 pm
Re: CUBLAS handle
Thank you.
The CUBLAS handle is needed to perform the CUBLAS functions, for example,
cublasIdamax(cublasHandle_t handle, int n, const float *x, int incx, int *result)
cublasIdamin(cublasHandle_t handle, int n, const double *x, int incx, int *result)
cublasDaxpy(cublasHandle_t handle, int n, const double *alpha, const double *x, int incx, double *y, int incy)
and other.
Is it possible after initialization CULA call cublasCreate_v2(cublasHandle_t *handle) and before shutdown CULA call cublasDestroy_v2 (cublasHandle_t handle)?
The CUBLAS handle is needed to perform the CUBLAS functions, for example,
cublasIdamax(cublasHandle_t handle, int n, const float *x, int incx, int *result)
cublasIdamin(cublasHandle_t handle, int n, const double *x, int incx, int *result)
cublasDaxpy(cublasHandle_t handle, int n, const double *alpha, const double *x, int incx, double *y, int incy)
and other.
Is it possible after initialization CULA call cublasCreate_v2(cublasHandle_t *handle) and before shutdown CULA call cublasDestroy_v2 (cublasHandle_t handle)?
- VictorGre1
- CULA Premium
- Posts: 10
- Joined: Sat Nov 28, 2009 10:37 am
Re: CUBLAS handle
You can safely create your own CUBLAS handles with cublasCreate_v2. These are completely independent of CULA, so you can make/destroy/use your CUBLAS handles even outside of the culaInit regions of your code.
- john
- Administrator
- Posts: 587
- Joined: Thu Jul 23, 2009 2:31 pm
4 posts
• Page 1 of 1
Return to General CULA Discussion
Who is online
Users browsing this forum: No registered users and 3 guests