mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-29 15:59:41 +02:00
[GPU] add automatic batchsize estimation
This commit is contained in:
parent
bbcba2553c
commit
01860455af
4 changed files with 75 additions and 36 deletions
16
GPy/util/gpu_init.py
Normal file
16
GPy/util/gpu_init.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
The package for scikits.cuda initialization
|
||||
|
||||
Global variables: initSuccess
|
||||
providing CUBLAS handle: cublas_handle
|
||||
"""
|
||||
|
||||
try:
|
||||
import pycuda.autoinit
|
||||
from scikits.cuda import cublas
|
||||
import scikits.cuda.linalg as culinalg
|
||||
culinalg.init()
|
||||
cublas_handle = cublas.cublasCreate()
|
||||
initSuccess = True
|
||||
except:
|
||||
initSuccess = False
|
||||
Loading…
Add table
Add a link
Reference in a new issue