cublas-0.4.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
LanguageHaskell98

Foreign.CUDA.BLAS.Context

Contents

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

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