summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevorMcDonell <>2018-10-02 15:02:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-10-02 15:02:00 (GMT)
commit44ffdb0218f2d50a5a5a85c28ade772d0b798c49 (patch)
treee69c96e9029a112ed6c5e569cebd57d1dd16bde4
parentf30f400d4396f34ff15729193c626fe80abd0d4f (diff)
version 0.5.0.0HEAD0.5.0.0master
-rw-r--r--CHANGELOG.md6
-rw-r--r--Foreign/CUDA/BLAS/Context.chs5
-rw-r--r--Foreign/CUDA/BLAS/Level3.chs17
-rw-r--r--cublas.cabal8
4 files changed, 32 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 874d6f3..7190575 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ project adheres to the [Haskell Package Versioning
Policy (PVP)](https://pvp.haskell.org)
+## [0.5.0.0] - 2018-10-02
+### Added
+ * `gemm[Strided]BatchedEx` from CUDA-9.1
+
+
## [0.4.0.1] - 2018-03-12
### Fixed
* Build fix for Cabal-2.2 (ghc-8.4)
@@ -24,6 +29,7 @@ Policy (PVP)](https://pvp.haskell.org)
* First version; replaces [bmsherman/cublas](https://github.com/bmsherman/cublas). Released on an unsuspecting world.
+[0.5.0.0]: https://github.com/tmcdonell/cublas/compare/release/0.4.0.1...v0.5.0.0
[0.4.0.1]: https://github.com/tmcdonell/cublas/compare/release/0.4.0.0...0.4.0.1
[0.4.0.0]: https://github.com/tmcdonell/cublas/compare/release/0.3.0.0...0.4.0.0
diff --git a/Foreign/CUDA/BLAS/Context.chs b/Foreign/CUDA/BLAS/Context.chs
index b258209..4f542ac 100644
--- a/Foreign/CUDA/BLAS/Context.chs
+++ b/Foreign/CUDA/BLAS/Context.chs
@@ -163,3 +163,8 @@ getMathMode _ = requireSDK 'getMathMode 9.0
-> `()' checkStatus*- #}
#endif
+-- TODO: since CUDA-10.0
+-- cublasLoggerConfigure
+-- cublas[Get,Set]LoggerCallback
+--
+
diff --git a/Foreign/CUDA/BLAS/Level3.chs b/Foreign/CUDA/BLAS/Level3.chs
index b2d3130..474c45c 100644
--- a/Foreign/CUDA/BLAS/Level3.chs
+++ b/Foreign/CUDA/BLAS/Level3.chs
@@ -133,6 +133,8 @@ module Foreign.CUDA.BLAS.Level3 (
dotEx,
dotcEx,
scalEx,
+ gemmBatchedEx,
+ gemmStridedBatchedEx,
) where
@@ -556,3 +558,18 @@ dotcEx _ _ _ _ _ _ _ _ _ _ _ = cublasError "'dotcEx' requires at least cuda-8.0"
scalEx :: Handle -> Int -> Ptr () -> Type -> DevicePtr () -> Type -> Int -> Type -> IO ()
scalEx _ _ _ _ _ _ _ _ = cublasError "'scalEx' requires at least cuda-8.0"
#endif
+#if CUDA_VERSION >= 9100
+
+{-# INLINEABLE gemmBatchedEx #-}
+{# fun unsafe cublasGemmBatchedEx as gemmBatchedEx { useHandle `Handle', cFromEnum `Operation', cFromEnum `Operation', `Int', `Int', `Int', castPtr `Ptr ()', useDevP `DevicePtr (DevicePtr ())', cFromEnum `Type', `Int', useDevP `DevicePtr ()', cFromEnum `Type', `Int', castPtr `Ptr ()', useDevP `DevicePtr ()', cFromEnum `Type', `Int', `Int', cFromEnum `Type', cFromEnum `GemmAlgorithm' } -> `()' checkStatus* #}
+
+{-# INLINEABLE gemmStridedBatchedEx #-}
+{# fun unsafe cublasGemmStridedBatchedEx as gemmStridedBatchedEx { useHandle `Handle', cFromEnum `Operation', cFromEnum `Operation', `Int', `Int', `Int', castPtr `Ptr ()', useDevP `DevicePtr ()', cFromEnum `Type', `Int', `Int64', useDevP `DevicePtr ()', cFromEnum `Type', `Int', `Int64', castPtr `Ptr ()', useDevP `DevicePtr ()', cFromEnum `Type', `Int', `Int64', `Int', cFromEnum `Type', cFromEnum `GemmAlgorithm' } -> `()' checkStatus* #}
+#else
+
+gemmBatchedEx :: Handle -> Operation -> Operation -> Int -> Int -> Int -> Ptr () -> DevicePtr (DevicePtr ()) -> Type -> Int -> DevicePtr () -> Type -> Int -> Ptr () -> DevicePtr () -> Type -> Int -> Int -> Type -> GemmAlgorithm -> IO ()
+gemmBatchedEx _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = cublasError "'gemmBatchedEx' requires at least cuda-9.1"
+
+gemmStridedBatchedEx :: Handle -> Operation -> Operation -> Int -> Int -> Int -> Ptr () -> DevicePtr () -> Type -> Int -> Int64 -> DevicePtr () -> Type -> Int -> Int64 -> Ptr () -> DevicePtr () -> Type -> Int -> Int64 -> Int -> Type -> GemmAlgorithm -> IO ()
+gemmStridedBatchedEx _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = cublasError "'gemmStridedBatchedEx' requires at least cuda-9.1"
+#endif
diff --git a/cublas.cabal b/cublas.cabal
index 5e2b117..e4f5f84 100644
--- a/cublas.cabal
+++ b/cublas.cabal
@@ -1,5 +1,5 @@
name: cublas
-version: 0.4.0.1
+version: 0.5.0.0
synopsis: FFI bindings to the CUDA BLAS library
description:
The cuBLAS library is an implementation of BLAS (Basic Linear Algebra
@@ -15,8 +15,8 @@ description:
license: BSD3
license-file: LICENSE
author: Trevor L. McDonell, Ben Sherman
-maintainer: Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
-copyright: Copyright (c) [2012..2017]. Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>, Ben Sherman <benmsherman@gmail.com>
+maintainer: Trevor L. McDonell <trevor.mcdonell@gmail.com>
+copyright: Copyright (c) [2012..2017]. Trevor L. McDonell <trevor.mcdonell@gmail.com>, Ben Sherman <benmsherman@gmail.com>
category: Foreign
cabal-version: >=1.24
@@ -79,6 +79,6 @@ source-repository head
source-repository this
type: git
location: https://github.com/tmcdonell/cublas
- tag: 0.4.0.1
+ tag: v0.5.0.0
-- vim: nospell