cuda 0.10.1.0 → 0.10.2.0
raw patch · 9 files changed
+100/−46 lines, 9 filessetup-changedPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Foreign.CUDA.Driver: ArrayAccessAccessSupported :: PeerAttribute
- Foreign.CUDA.Driver.Context.Peer: ArrayAccessAccessSupported :: PeerAttribute
+ Foreign.CUDA.Analysis.Device: instance GHC.Show.Show Foreign.CUDA.Analysis.Device.Allocation
+ Foreign.CUDA.Analysis.Device: instance GHC.Show.Show Foreign.CUDA.Analysis.Device.DeviceResources
+ Foreign.CUDA.Driver: AccessAccessSupported :: PeerAttribute
+ Foreign.CUDA.Driver.Context.Peer: AccessAccessSupported :: PeerAttribute
+ Foreign.CUDA.Driver.Device: HandleTypePosixFileDescriptorSupported :: DeviceAttribute
+ Foreign.CUDA.Driver.Device: HandleTypeWin32HandleSupported :: DeviceAttribute
+ Foreign.CUDA.Driver.Device: HandleTypeWin32KmtHandleSupported :: DeviceAttribute
+ Foreign.CUDA.Driver.Device: VirtualAddressManagementSupported :: DeviceAttribute
+ Foreign.CUDA.Driver.Error: CompatNotSupportedOnDevice :: Status
+ Foreign.CUDA.Driver.Error: GraphExecUpdateFailure :: Status
+ Foreign.CUDA.Driver.Error: StreamCaptureWrongThread :: Status
+ Foreign.CUDA.Driver.Error: SystemDriverMismatch :: Status
+ Foreign.CUDA.Driver.Error: Timeout :: Status
+ Foreign.CUDA.Driver.Graph.Capture: Global :: Mode
+ Foreign.CUDA.Driver.Graph.Capture: Relaxed :: Mode
+ Foreign.CUDA.Driver.Graph.Capture: ThreadLocal :: Mode
+ Foreign.CUDA.Driver.Graph.Capture: instance GHC.Classes.Eq Foreign.CUDA.Driver.Graph.Capture.Mode
+ Foreign.CUDA.Driver.Graph.Capture: instance GHC.Enum.Bounded Foreign.CUDA.Driver.Graph.Capture.Mode
+ Foreign.CUDA.Driver.Graph.Capture: instance GHC.Show.Show Foreign.CUDA.Driver.Graph.Capture.Mode
+ Foreign.CUDA.Driver.Module: Compute72 :: JITTarget
+ Foreign.CUDA.Driver.Module.Base: Compute72 :: JITTarget
+ Foreign.CUDA.Runtime.Error: AlreadyAcquired :: Status
+ Foreign.CUDA.Runtime.Error: AlreadyMapped :: Status
+ Foreign.CUDA.Runtime.Error: ArrayIsMapped :: Status
+ Foreign.CUDA.Runtime.Error: CompatNotSupportedOnDevice :: Status
+ Foreign.CUDA.Runtime.Error: ContextIsDestroyed :: Status
+ Foreign.CUDA.Runtime.Error: DeviceUninitialized :: Status
+ Foreign.CUDA.Runtime.Error: FileNotFound :: Status
+ Foreign.CUDA.Runtime.Error: GraphExecUpdateFailure :: Status
+ Foreign.CUDA.Runtime.Error: InvalidSource :: Status
+ Foreign.CUDA.Runtime.Error: LaunchIncompatibleTexturing :: Status
+ Foreign.CUDA.Runtime.Error: NotMapped :: Status
+ Foreign.CUDA.Runtime.Error: NotMappedAsArray :: Status
+ Foreign.CUDA.Runtime.Error: NotMappedAsPointer :: Status
+ Foreign.CUDA.Runtime.Error: StreamCaptureWrongThread :: Status
+ Foreign.CUDA.Runtime.Error: SymbolNotFound :: Status
+ Foreign.CUDA.Runtime.Error: SystemDriverMismatch :: Status
+ Foreign.CUDA.Runtime.Error: Timeout :: Status
Files
- CHANGELOG.md +9/−2
- README.md +39/−1
- Setup.hs +4/−2
- cuda.cabal +13/−13
- src/Foreign/CUDA/Analysis/Device.chs +25/−9
- src/Foreign/CUDA/Analysis/Occupancy.hs +10/−9
- src/Foreign/CUDA/Driver/Device.chs +0/−2
- src/Foreign/CUDA/Driver/Exec.chs +0/−2
- src/Foreign/CUDA/Driver/Graph/Build.chs +0/−6
CHANGELOG.md view
@@ -10,8 +10,14 @@ because NVIDIA are A-OK introducing breaking changes in minor updates. -## [next]+## [0.10.2.0] - 2020-08-26 ### Added+ * Add support for CUDA-10.2+ * Add support for Cabal-3+ * Add device properties for SM7.x, SM8++## [0.10.1.0] - 2019-04-29+### Added * Add support for CUDA-10.1 ### Changed@@ -154,7 +160,8 @@ * Add functions from CUDA-6.5 -[next]: https://github.com/tmcdonell/cuda/compare/v0.10.0.0...HEAD+[0.10.2.0]: https://github.com/tmcdonell/cuda/compare/v0.10.1.0...v0.10.2.0+[0.10.1.0]: https://github.com/tmcdonell/cuda/compare/v0.10.0.0...v0.10.1.0 [0.10.0.0]: https://github.com/tmcdonell/cuda/compare/0.9.0.3...v0.10.0.0 [0.9.0.3]: https://github.com/tmcdonell/cuda/compare/0.9.0.2...0.9.0.3 [0.9.0.2]: https://github.com/tmcdonell/cuda/compare/0.9.0.1...0.9.0.2
README.md view
@@ -20,5 +20,43 @@ For important information on installing on Windows, see: - <https://github.com/tmcdonell/cuda/blob/master/WINDOWS.markdown>+ <https://github.com/tmcdonell/cuda/blob/master/WINDOWS.md>+++## Missing functionality++An incomplete list of missing bindings. Pull requests welcome!++### CUDA-9++- cuLaunchCooperativeKernelMultiDevice++### CUDA-10.0++- cuDeviceGetLuid (windows only?)+- cuLaunchHostFunc+- cuGraphHostNode[Get/Set]Params+- cuGraphKernelNode[Get/Set]Params+- cuGraphMemcpyNode[Get/Set]Params+- cuGraphMemsetNode[Get/Set]Params++### CUDA-10.2++- cuDeviceGetNvSciSyncAttributes+- cuMemAddressFree+- cuMemAddressReserve+- cuMemCreate+- cuMemExportToShareableHandle+- cuMemGetAccess+- cuMemGetAllocationGranularity+- cuMemGetAllocationPrepertiesFromHandle+- cuMemImportFromShareableHandle+- cuMemMap+- cuMemRelease+- cuMemSetAccess+- cuMemUnmap+- cuGraphExecHostNodeSetParams+- cuGraphExecMemcpyNodeSetParams+- cuGraphExecMemsetNodeSetParams+- cuGraphExecUpdate
Setup.hs view
@@ -64,7 +64,6 @@ main = defaultMainWithHooks customHooks where readHook get_verbosity a flags = do- noExtraFlags a getHookedBuildInfo (fromFlag (get_verbosity flags)) preprocessors = hookedPreProcessors simpleUserHooks@@ -105,7 +104,6 @@ currentPlatform = hostPlatform lbi compilerId_ = compilerId (compiler lbi) --- noExtraFlags args generateAndStoreBuildInfo verbosity profile@@ -196,7 +194,11 @@ , extraLibDirs = extraLibDirs' , frameworks = frameworks' , extraFrameworkDirs = frameworkDirs'+#if MIN_VERSION_Cabal(3,0,0)+ , options = PerCompilerFlavor (if os /= Windows then ghcOptions else []) []+#else , options = [(GHC, ghcOptions) | os /= Windows]+#endif , customFieldsBI = [c2hsExtraOptions] }
cuda.cabal view
@@ -1,5 +1,5 @@ Name: cuda-Version: 0.10.1.0+Version: 0.10.2.0 Synopsis: FFI binding to the CUDA interface for programming NVIDIA GPUs Description: The CUDA library provides a direct, general purpose C-like SPMD programming@@ -28,7 +28,7 @@ . * "Foreign.CUDA.Runtime" .- Tested with library versions up to CUDA-9.2. See also the+ Tested with library versions up to CUDA-10.2. See also the <https://travis-ci.org/tmcdonell/cuda travis-ci.org> build matrix for version compatibility. .@@ -65,7 +65,7 @@ Bug-reports: https://github.com/tmcdonell/cuda/issues Category: Foreign Cabal-version: >= 1.24-Tested-with: GHC >= 7.8+Tested-with: GHC >= 8.0 Build-type: Custom Extra-tmp-files:@@ -86,7 +86,7 @@ Library hs-source-dirs: src- Exposed-Modules:+ exposed-modules: Foreign.CUDA Foreign.CUDA.Path Foreign.CUDA.Ptr@@ -138,16 +138,16 @@ -- Extras Foreign.C.Extra - Other-modules:+ other-modules: Foreign.CUDA.Internal.C2HS Text.Show.Describe - Include-dirs: .- C-sources: cbits/stubs.c+ include-dirs: .+ c-sources: cbits/stubs.c cbits/init.c - Build-tools: c2hs >= 0.21- Build-depends:+ build-tools: c2hs >= 0.21+ build-depends: base >= 4.7 && < 5 , bytestring >= 0.10.4 , filepath >= 1.0@@ -155,7 +155,7 @@ , uuid-types >= 1.0 default-language: Haskell98- Extensions:+ ghc-options: -Wall -O2@@ -172,10 +172,10 @@ Executable nvidia-device-query- Main-is: DeviceQuery.hs+ main-is: DeviceQuery.hs hs-source-dirs: examples/src/deviceQueryDrv - Build-depends:+ build-depends: base >= 4 && < 5 , cuda , pretty@@ -190,6 +190,6 @@ source-repository this type: git location: https://github.com/tmcdonell/cuda- tag: v0.10.1.0+ tag: v0.10.2.0 -- vim: nospell
src/Foreign/CUDA/Analysis/Device.chs view
@@ -150,6 +150,8 @@ -- wikipedia entry: <https://en.wikipedia.org/wiki/CUDA#Version_features_and_specifications> -- data Allocation = Warp | Block+ deriving Show+ data DeviceResources = DeviceResources { threadsPerWarp :: !Int -- ^ Warp size , coresPerMP :: !Int -- ^ Number of SIMD arithmetic units per multiprocessor@@ -168,6 +170,7 @@ , warpRegAllocUnit :: !Int -- ^ Warp register allocation granularity , maxGridsPerDevice :: !Int -- ^ Maximum number of resident grids per device (concurrent kernels) }+ deriving Show -- |@@ -322,8 +325,7 @@ , maxGridsPerDevice = 16 } - Compute 7 0 -> resources (Compute 7 2) -- Volta GV100- Compute 7 2 -> DeviceResources+ Compute 7 0 -> DeviceResources -- Volta GV100 { threadsPerWarp = 32 , coresPerMP = 64 , warpsPerMP = 64@@ -342,21 +344,35 @@ , maxGridsPerDevice = 128 } - Compute 7 5 -> DeviceResources -- Turing TU1xx- { threadsPerWarp = 32- , coresPerMP = 64- , warpsPerMP = 32- , threadsPerMP = 1024+ Compute 7 2 -> (resources (Compute 7 0)) -- Volta GV10B+ { maxGridsPerDevice = 16+ , maxSharedMemPerBlock = 49152+ }++ Compute 7 5 -> (resources (Compute 7 0)) -- Turing TU1xx+ { warpsPerMP = 32 , threadBlocksPerMP = 16+ , threadsPerMP = 1024+ , maxGridsPerDevice = 128 , sharedMemPerMP = 65536 -- of 96KB , maxSharedMemPerBlock = 65536+ }++ Compute 8 0 -> DeviceResources -- Ampere GA100+ { threadsPerWarp = 32+ , coresPerMP = 64+ , warpsPerMP = 64+ , threadsPerMP = 2048+ , threadBlocksPerMP = 32+ , sharedMemPerMP = 167936 -- of 192KB+ , maxSharedMemPerBlock = 163840 , regFileSizePerMP = 65536 , maxRegPerBlock = 65536 , regAllocUnit = 256 , regAllocationStyle = Warp , maxRegPerThread = 255- , sharedMemAllocUnit = 256- , warpAllocUnit = 2+ , sharedMemAllocUnit = 128+ , warpAllocUnit = 4 , warpRegAllocUnit = 256 , maxGridsPerDevice = 128 }
src/Foreign/CUDA/Analysis/Occupancy.hs view
@@ -57,7 +57,7 @@ import Data.Ord import Data.List -import Foreign.CUDA.Analysis.Device+import Foreign.CUDA.Analysis.Device hiding ( maxSharedMemPerBlock ) -- GPU Occupancy per multiprocessor@@ -97,7 +97,8 @@ -- Physical resources --- gpu = deviceResources dev+ gpu = deviceResources dev+ maxSharedMemPerBlock = fromIntegral (sharedMemPerBlock dev) -- 2080Ti reports 48KB, but should be 64KB ! -- Allocated resource limits --@@ -116,16 +117,16 @@ -- Maximum thread blocks per multiprocessor --- limitDueToWarps = threadBlocksPerMP gpu `min` (warpsPerMP gpu `div` limitWarpsPerBlock)+ limitDueToWarps = threadBlocksPerMP gpu `min` (warpsPerMP gpu `div` limitWarpsPerBlock) limitDueToRegs- | regs > maxRegPerThread gpu = 0- | regs > 0 = (limitRegsPerSM `div` limitRegsPerBlock) * (regFileSizePerMP gpu `div` maxRegPerBlock gpu)- | otherwise = threadBlocksPerMP gpu+ | regs > maxRegPerThread gpu = 0+ | regs > 0 = (limitRegsPerSM `div` limitRegsPerBlock) * (regFileSizePerMP gpu `div` maxRegPerBlock gpu)+ | otherwise = threadBlocksPerMP gpu limitDueToSMem- | smem > maxSharedMemPerBlock gpu = 0- | smem > 0 = sharedMemPerMP gpu `div` limitSMemPerBlock- | otherwise = threadBlocksPerMP gpu+ | smem > maxSharedMemPerBlock = 0+ | smem > 0 = sharedMemPerMP gpu `div` limitSMemPerBlock+ | otherwise = threadBlocksPerMP gpu -- |
src/Foreign/CUDA/Driver/Device.chs view
@@ -290,8 +290,6 @@ #endif --- TODO: cuDeviceGetLuid, introduced CUDA-10.0 (windows only)- -- | -- Return the properties of the selected device --
src/Foreign/CUDA/Driver/Exec.chs view
@@ -352,8 +352,6 @@ } -> `Status' cToEnum #} #endif --- TODO: cuLaunchCooperativeKernelMultiDevice introduced CUDA-9.0--- TODO: cuLaunchHostFunc introduced CUDA-10.0 -------------------------------------------------------------------------------- -- Deprecated
src/Foreign/CUDA/Driver/Graph/Build.chs view
@@ -659,12 +659,6 @@ #endif --- TODO: since CUDA-10.0--- * cuGraphHostNode[Get/Set]Params--- * cuGraphKernelNode[Get/Set]Params--- * cuGraphMemcpyNode[Get/Set]Params--- * cuGraphMemsetNode[Get/Set]Params- -------------------------------------------------------------------------------- -- Internal --------------------------------------------------------------------------------