Beispiel #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()
Beispiel #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()
Beispiel #3
0
def init():
    """
    Initialize libraries used by scikits.cuda.

    Initialize the CUBLAS and CULA libraries used by high-level functions
    provided 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:
    global _global_cublas_handle
    _global_cublas_handle = cublas.cublasCreate()

    # culaSelectDevice() need not (and, in fact, cannot) be called
    # here because the host thread has already been bound to a GPU
    # device:
    if _has_cula:
        cula.culaInitialize()
Beispiel #4
0
def init():
    """
    Initialize libraries used by scikits.cuda.

    Initialize the CUBLAS and CULA libraries used by high-level functions
    provided 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:
    global _global_cublas_handle
    _global_cublas_handle = cublas.cublasCreate()

    # culaSelectDevice() need not (and, in fact, cannot) be called
    # here because the host thread has already been bound to a GPU
    # device:
    if _has_cula:
        cula.culaInitialize()
Beispiel #5
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()
Beispiel #6
0
#!/usr/bin/env python

"""
Autoinitialize CUDA tools.
"""

import cublas
import cula

cublas.cublasInit()
cula.culaInitialize()