cusparse 0.2.0.0 → 0.3.0.0
raw patch · 5 files changed
+50/−3 lines, 5 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Foreign.CUDA.BLAS.Sparse: NotSupported :: Status
+ Foreign.CUDA.BLAS.Sparse.Convert: Csr2cscAlg1 :: Algorithm_csr2csc
+ Foreign.CUDA.BLAS.Sparse.Convert: Csr2cscAlg2 :: Algorithm_csr2csc
+ Foreign.CUDA.BLAS.Sparse.Convert: csr2cscEx2 :: Handle -> Int -> Int -> Int -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> Type -> Action -> IndexBase -> Algorithm_csr2csc -> DevicePtr () -> IO ()
+ Foreign.CUDA.BLAS.Sparse.Convert: csr2cscEx2_bufferSize :: Handle -> Int -> Int -> Int -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> Type -> Action -> IndexBase -> Algorithm_csr2csc -> IO Int
+ Foreign.CUDA.BLAS.Sparse.Convert: data Algorithm_csr2csc
+ Foreign.CUDA.BLAS.Sparse.Error: NotSupported :: Status
Files
- CHANGELOG.md +6/−0
- Foreign/CUDA/BLAS/Sparse/Convert.chs +18/−0
- Foreign/CUDA/BLAS/Sparse/Internal/Types.chs +19/−0
- Setup.hs +4/−0
- cusparse.cabal +3/−3
CHANGELOG.md view
@@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). +## [0.3.0.0] - 2020-08-26+### Added+ * Operations from CUDA-10.1+ * Support for Cabal-3+ ## [0.2.0.0] - 2018-10-02 ### Added * Level 3 operations from CUDA-9.2@@ -19,6 +24,7 @@ * First version; split off from [bmsherman/cublas](https://github.com/bmsherman/cublas). Released on an unsuspecting world. +[0.3.0.0]: https://github.com/tmcdonell/cusparse/compare/v0.2.0.0...v0.3.0.0 [0.2.0.0]: https://github.com/tmcdonell/cusparse/compare/0.1.0.1...v0.2.0.0 [0.1.0.1]: https://github.com/tmcdonell/cusparse/compare/0.1.0.0...0.1.0.1
Foreign/CUDA/BLAS/Sparse/Convert.chs view
@@ -26,6 +26,7 @@ Action(..), Hybrid, HybridPartition(..),+ Algorithm_csr2csc(..), Info_csru2csr, Info_prune, sbsr2csr,@@ -182,6 +183,8 @@ dnnz_compress, cnnz_compress, znnz_compress,+ csr2cscEx2,+ csr2cscEx2_bufferSize, ) where @@ -875,4 +878,19 @@ znnz_compress :: Handle -> Int -> MatrixDescriptor -> DevicePtr (Complex Double) -> DevicePtr Int32 -> DevicePtr Int32 -> Ptr Int32 -> (Complex Double) -> IO () znnz_compress _ _ _ _ _ _ _ _ = cusparseError "'znnz_compress' requires at least cuda-9.0"+#endif+#if CUDA_VERSION >= 10010++{-# INLINEABLE csr2cscEx2 #-}+{# fun unsafe cusparseCsr2cscEx2 as csr2cscEx2 { useHandle `Handle', `Int', `Int', `Int', useDevP `DevicePtr ()', useDevP `DevicePtr Int32', useDevP `DevicePtr Int32', useDevP `DevicePtr ()', useDevP `DevicePtr Int32', useDevP `DevicePtr Int32', cFromEnum `Type', cFromEnum `Action', cFromEnum `IndexBase', cFromEnum `Algorithm_csr2csc', useDevP `DevicePtr ()' } -> `()' checkStatus*- #}++{-# INLINEABLE csr2cscEx2_bufferSize #-}+{# fun unsafe cusparseCsr2cscEx2_bufferSize as csr2cscEx2_bufferSize { useHandle `Handle', `Int', `Int', `Int', useDevP `DevicePtr ()', useDevP `DevicePtr Int32', useDevP `DevicePtr Int32', useDevP `DevicePtr ()', useDevP `DevicePtr Int32', useDevP `DevicePtr Int32', cFromEnum `Type', cFromEnum `Action', cFromEnum `IndexBase', cFromEnum `Algorithm_csr2csc', alloca- `Int' peekIntConv* } -> `()' checkStatus*- #}+#else++csr2cscEx2 :: Handle -> Int -> Int -> Int -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> Type -> Action -> IndexBase -> Algorithm_csr2csc -> DevicePtr () -> IO ()+csr2cscEx2 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = cusparseError "'csr2cscEx2' requires at least cuda-10.0"++csr2cscEx2_bufferSize :: Handle -> Int -> Int -> Int -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> DevicePtr () -> DevicePtr Int32 -> DevicePtr Int32 -> Type -> Action -> IndexBase -> Algorithm_csr2csc -> Int -> IO ()+csr2cscEx2_bufferSize _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = cusparseError "'csr2cscEx2_bufferSize' requires at least cuda-10.0" #endif
Foreign/CUDA/BLAS/Sparse/Internal/Types.chs view
@@ -85,3 +85,22 @@ { underscoreToCase } with prefix="CUSPARSE_SOLVE_POLICY" deriving (Eq, Show) #} +-- | Indices the algorithm to use for CSR to CSC matrix conversion+--+-- Algorithm 1 requires extra storage proportional to the number of nonzero+-- values @nnz@. It is in general faster than algorithm 2 and the result is+-- deterministic.+--+-- Algorithm 2 requires extra storage proportional to the number of rows @m@.+-- It is non-deterministic, and does not ensure always the same ordering of+-- CSC column indices and values. It is faster than algorithm 1 for regular+-- matrices.+--+#if CUDA_VERSION < 10010+data Algorithm_csr2csc+#else+{# enum cusparseCsr2CscAlg_t as Algorithm_csr2csc+ { underscoreToCase }+ with prefix="CUSPARSE" deriving (Eq, Show) #}+#endif+
Setup.hs view
@@ -151,7 +151,11 @@ , extraLibs = extraLibs' , extraGHCiLibs = extraGHCiLibs' , extraLibDirs = extraLibDirs'+#if MIN_VERSION_Cabal(3,0,0)+ , options = PerCompilerFlavor (if os /= Windows then ghcOptions else []) []+#else , options = [(GHC, ghcOptions) | os /= Windows]+#endif , customFieldsBI = [c2hsExtraOptions] }
cusparse.cabal view
@@ -1,5 +1,5 @@ name: cusparse-version: 0.2.0.0+version: 0.3.0.0 synopsis: FFI bindings to the CUDA Sparse BLAS library description: The cuSPARSE library contains a set of basic linear algebra subroutines for@@ -18,7 +18,7 @@ license-file: LICENSE author: Trevor L. McDonell maintainer: Trevor L. McDonell <trevor.mcdonell@gmail.com>-copyright: Copyright (c) [2017]. Trevor L. McDonell <trevor.mcdonell@gmail.com>+copyright: Copyright (c) [2017..2018]. Trevor L. McDonell <trevor.mcdonell@gmail.com> category: Foreign cabal-version: >=1.24 @@ -86,6 +86,6 @@ source-repository this type: git location: https://github.com/tmcdonell/cusparse- tag: v0.2.0.0+ tag: v0.3.0.0 -- vim: nospell