Copyright | [2014..2017] Trevor L. McDonell |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <tmcdonell@cse.unsw.edu.au> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell98 |
- newtype Handle = Handle {}
- create :: IO Handle
- destroy :: Handle -> IO ()
- data PointerMode
- data AtomicsMode
- data MathMode
- setPointerMode :: Handle -> PointerMode -> IO ()
- getPointerMode :: Handle -> IO PointerMode
- setAtomicsMode :: Handle -> AtomicsMode -> IO ()
- getAtomicsMode :: Handle -> IO AtomicsMode
- setMathMode :: Handle -> MathMode -> IO ()
- getMathMode :: Handle -> IO MathMode
Context management
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
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.
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.
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
data AtomicsMode Source #
Determines whether cuBLAS routines can alternate implementations which make use of atomic instructions.
http://docs.nvidia.com/cuda/cublas/index.html#cublasatomicsmode_t
Enum for default math mode / tensor math mode
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