cublas-0.6.0.0: FFI bindings to the CUDA BLAS library
Copyright[2014..2017] Trevor L. McDonell
LicenseBSD3
MaintainerTrevor L. McDonell <tmcdonell@cse.unsw.edu.au>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Foreign.CUDA.BLAS.Context

Description

 
Synopsis

Context management

newtype Handle Source #

An opaque handle to the cuBLAS library context, which is passed to all library function calls.

http://docs.nvidia.com/cuda/cublas/index.html#cublashandle_t

Constructors

Handle 

Fields

create :: IO Handle Source #

This function initializes the CUBLAS library and creates a handle to an opaque structure holding the CUBLAS library context. It allocates hardware resources on the host and device and must be called prior to making any other CUBLAS library calls.

http://docs.nvidia.com/cuda/cublas/index.html#cublascreate

destroy :: Handle -> IO () Source #

This function releases hardware resources used by the CUBLAS library. The release of GPU resources may be deferred until the application exits. This function is usually the last call with a particular handle to the CUBLAS library.

http://docs.nvidia.com/cuda/cublas/index.html#cublasdestroy

Utilities

data PointerMode Source #

For functions which take scalar value arguments, determines whether those values are passed by reference on the host or device.

http://docs.nvidia.com/cuda/cublas/index.html#cublaspointermode_t

Constructors

Host 
Device 

data MathMode Source #

Enum for default math mode / tensor math mode

Constructors

DefaultMath 
TensorMath 

setPointerMode :: Handle -> PointerMode -> IO () Source #

Set the pointer mode used by cuBLAS library functions. For example, this controls whether the scaling parameters \(\alpha\) and \(\beta\) of the ?gemm operation are treated as residing in host or device memory.

The default mode is for values to be passed by reference from the host.

http://docs.nvidia.com/cuda/cublas/index.html#cublassetpointermode

getPointerMode :: Handle -> IO PointerMode Source #

Get the pointer mode used by cuBLAS library functions to pass scalar arguments.

http://docs.nvidia.com/cuda/cublas/index.html#cublasgetpointermode

setAtomicsMode :: Handle -> AtomicsMode -> IO () Source #

Set whether cuBLAS library functions are allowed to use atomic functions, when available. The implementations are generally faster, but can generate results which are not strictly identical from one run to another.

http://docs.nvidia.com/cuda/cublas/index.html#cublassetatomicsmode

getAtomicsMode :: Handle -> IO AtomicsMode Source #

Determine whether cuBLAS library functions are allowed to use atomic operations.

http://docs.nvidia.com/cuda/cublas/index.html#cublasgetatomicsmode

setMathMode :: Handle -> MathMode -> IO () Source #

Set whether cuBLAS library functions are allowed to use Tensor Core operations where available.

http://docs.nvidia.com/cuda/cublas/index.html#cublassetmathmode

since 0.4.0.0

getMathMode :: Handle -> IO MathMode Source #

Determine whether cuBLAS library functions are allowed to use Tensor Core operations where available.

http://docs.nvidia.com/cuda/cublas/index.html#cublasgetmathmode

since 0.4.0.0