accelerate-llvm-ptx 1.1.0.0 → 1.1.0.1
raw patch · 5 files changed
+36/−9 lines, 5 filesdep ~cuda
Dependency ranges changed: cuda
Files
- CHANGELOG.md +7/−1
- Data/Array/Accelerate/LLVM/PTX/Compile/Libdevice/Load.hs +16/−0
- Data/Array/Accelerate/LLVM/PTX/Compile/Libdevice/TH.hs +7/−3
- Data/Array/Accelerate/LLVM/PTX/Target.hs +1/−0
- accelerate-llvm-ptx.cabal +5/−5
CHANGELOG.md view
@@ -6,6 +6,11 @@ project adheres to the [Haskell Package Versioning Policy (PVP)](https://pvp.haskell.org) ++## [1.1.0.1] - 2018-01-08+### Fixed+ * add support for building with CUDA-9.x+ ## [1.1.0.0] - 2017-09-21 ### Added * support for GHC-8.2@@ -27,7 +32,8 @@ * initial release -[1.1.0.0]: https://github.com/AccelerateHS/accelerate-llvm/compare/1.0.0.0...HEAD+[1.1.0.1]: https://github.com/AccelerateHS/accelerate-llvm/compare/1.1.0.0...1.1.0.1-ptx+[1.1.0.0]: https://github.com/AccelerateHS/accelerate-llvm/compare/1.0.0.0...1.1.0.0 [1.0.0.1]: https://github.com/AccelerateHS/accelerate-llvm/compare/1.0.0.0...1.0.0.1 [1.0.0.0]: https://github.com/AccelerateHS/accelerate-llvm/compare/be7f91295f77434b2103c70aa1cabb6a4f2b09a8...1.0.0.0
Data/Array/Accelerate/LLVM/PTX/Compile/Libdevice/Load.hs view
@@ -33,6 +33,7 @@ -- cuda import Foreign.CUDA.Analysis+import qualified Foreign.CUDA.Driver as CUDA -- standard library import Data.ByteString ( ByteString )@@ -64,6 +65,10 @@ libdevice :: Compute -> a instance Libdevice AST.Module where+ libdevice _+ | CUDA.libraryVersion >= 9000+ = libdevice_50_mdl+ -- libdevice (Compute n m) = case (n,m) of (2,_) -> libdevice_20_mdl -- 2.0, 2.1@@ -74,6 +79,10 @@ _ -> $internalError "libdevice" "no binary for this architecture" instance Libdevice (String, ByteString) where+ libdevice _+ | CUDA.libraryVersion >= 9000+ = libdevice_50_bc+ -- libdevice (Compute n m) = case (n,m) of (2,_) -> libdevice_20_bc -- 2.0, 2.1@@ -87,6 +96,13 @@ -- Load the libdevice bitcode files as an LLVM AST module. The top-level -- unsafePerformIO ensures that the data is only read from disk once per program -- execution.+--+-- TLM: As of CUDA-9.0, libdevice is no longer split into multiple files+-- depending on the target compute architecture. The function 'libdeviceBitcode'+-- knows this and ignores the architecture parameter, and in the above instances+-- we only refer to the 5.0 module below. Although the TH splices will be run+-- 4 times (and read in the same file 4 times) hopefully GHC is smart enough to+-- remove the unused bindings as dead code... -- {-# NOINLINE libdevice_20_mdl #-} {-# NOINLINE libdevice_30_mdl #-}
Data/Array/Accelerate/LLVM/PTX/Compile/Libdevice/TH.hs view
@@ -32,6 +32,7 @@ import Foreign.CUDA.Path import Foreign.CUDA.Analysis+import qualified Foreign.CUDA.Driver as CUDA import Data.ByteString ( ByteString ) import Data.FileEmbed@@ -105,9 +106,12 @@ -- libdeviceBitcode :: Compute -> Q (TExp (String, ByteString)) libdeviceBitcode (Compute m n) = do- let arch = printf "libdevice.compute_%d%d" m n- err = $internalError "libdevice" (printf "not found: %s.YY.bc" arch)- best f = arch `isPrefixOf` f && takeExtension f == ".bc"+ let basename+ | CUDA.libraryVersion < 9000 = printf "libdevice.compute_%d%d" m n+ | otherwise = "libdevice"+ --+ err = $internalError "libdevice" (printf "not found: %s.YY.bc" basename)+ best f = basename `isPrefixOf` f && takeExtension f == ".bc" base = cudaInstallPath </> "nvvm" </> "libdevice" -- files <- runIO $ getDirectoryContents base
Data/Array/Accelerate/LLVM/PTX/Target.hs view
@@ -165,6 +165,7 @@ ptxISAVersion 5 2 = "ptx41" ptxISAVersion 5 3 = "ptx42" ptxISAVersion 6 _ = "ptx50"+ptxISAVersion 7 _ = "ptx60" ptxISAVersion _ _ = "ptx40"
accelerate-llvm-ptx.cabal view
@@ -1,5 +1,5 @@ name: accelerate-llvm-ptx-version: 1.1.0.0+version: 1.1.0.1 cabal-version: >= 1.10 tested-with: GHC >= 7.10 build-type: Simple@@ -164,7 +164,7 @@ , accelerate-llvm == 1.1.* , bytestring >= 0.10.4 , containers >= 0.5 && <0.6- , cuda >= 0.8+ , cuda >= 0.9 , deepseq >= 1.3 , directory >= 1.0 , dlist >= 0.6@@ -172,8 +172,8 @@ , file-embed >= 0.0.8 , filepath >= 1.0 , hashable >= 1.2- , llvm-hs >= 4.1 && < 5.1- , llvm-hs-pure >= 4.1 && < 5.1+ , llvm-hs >= 4.1 && < 5.2+ , llvm-hs-pure >= 4.1 && < 5.2 , mtl >= 2.2.1 , nvvm >= 0.7.5 , pretty >= 1.1@@ -212,7 +212,7 @@ source-repository this type: git- tag: 1.1.0.0+ tag: 1.1.0.1-ptx location: https://github.com/AccelerateHS/accelerate-llvm.git -- vim: nospell