Esempio n. 1
0
def init():
    """
    Initialize libraries used by scikits.cuda.
    
    Notes
    -----
    This function does not initialize PyCUDA; it uses whatever device
    and context were initialized in the current host thread.
    
    """

    # CUBLAS uses whatever device is being used by the host thread:
    cublas.cublasInit()

    # culaSelectDevice() need not (and, in fact, cannot) be called
    # here because the host thread has already been bound to a GPU
    # device:
    cula.culaInitialize()
Esempio n. 2
0
def init():
    """
    Initialize libraries used by scikits.cuda.
    
    Notes
    -----
    This function does not initialize PyCUDA; it uses whatever device
    and context were initialized in the current host thread.
    
    """

    # CUBLAS uses whatever device is being used by the host thread:
    cublas.cublasInit()

    # culaSelectDevice() need not (and, in fact, cannot) be called
    # here because the host thread has already been bound to a GPU
    # device:
    cula.culaInitialize()
Esempio n. 3
0
#!/usr/bin/env python

"""
Autoinitialize CUDA tools.
"""

import cublas
try:
    import cula
    _has_cula = True
except:
    _has_cula = False

cublas.cublasInit()

if _has_cula:
    cula.culaInitialize()
Esempio n. 4
0
#!/usr/bin/env python

"""
Autoinitialize CUDA tools.
"""

import cublas
import cula

cublas.cublasInit()
cula.culaInitialize()