forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prettyprint test (accelerate-cuda 0.14.0.0)
- Loading branch information
Showing
4 changed files
with
226 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Cabal/tests/UnitTests/Distribution/PackageDescription/PrettyPrint.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
module UnitTests.Distribution.PackageDescription.PrettyPrint | ||
( tests | ||
) where | ||
|
||
import Data.ByteString.Char8 (unpack) | ||
import Data.FileEmbed (embedFile) | ||
import Data.Maybe | ||
import Test.Tasty | ||
import Test.Tasty.QuickCheck | ||
|
||
import Distribution.PackageDescription.Parse | ||
import Distribution.PackageDescription.PrettyPrint | ||
|
||
hoist :: ParseResult a -> Maybe a | ||
hoist (ParseOk _ x) = Just x | ||
hoist (ParseFailed _) = Nothing | ||
|
||
prop_readwriteread :: String -> Property | ||
prop_readwriteread s = | ||
let desc = hoist . parsePackageDescription $ s | ||
desc' = desc >>= hoist . parsePackageDescription . showGenericPackageDescription | ||
in property $ isJust desc && desc == desc' | ||
|
||
tests :: [TestTree] | ||
tests = | ||
[ testProperty "accelerate-cude 0.14.0.0" $ | ||
prop_readwriteread $ unpack $(embedFile "tests/UnitTests/Distribution/PackageDescription/accelerate-cuda.0.14.0.0.cabal") | ||
] |
191 changes: 191 additions & 0 deletions
191
Cabal/tests/UnitTests/Distribution/PackageDescription/accelerate-cuda.0.14.0.0.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
Name: accelerate-cuda | ||
Version: 0.14.0.0 | ||
Cabal-version: >= 1.6 | ||
Tested-with: GHC == 7.6.* | ||
Build-type: Custom | ||
|
||
Synopsis: Accelerate backend for NVIDIA GPUs | ||
Description: | ||
This library implements a backend for the /Accelerate/ language instrumented | ||
for parallel execution on CUDA-capable NVIDIA GPUs. For further information, | ||
refer to the main /Accelerate/ package: | ||
<http://hackage.haskell.org/package/accelerate> | ||
. | ||
To use this backend you will need: | ||
. | ||
1. A CUDA-enabled NVIDIA GPU with, for full functionality, compute | ||
capability 1.2 or greater. See the table on Wikipedia for supported GPUs: | ||
<http://en.wikipedia.org/wiki/CUDA#Supported_GPUs> | ||
. | ||
2. The CUDA SDK, available from the NVIDIA Developer Zone: | ||
<http://developer.nvidia.com/cuda-downloads> | ||
. | ||
See the Haddock documentation for additional information related to using this | ||
backend. | ||
. | ||
Compile modules that use the CUDA backend with the @-threaded@ flag. | ||
. | ||
|
||
License: BSD3 | ||
License-file: LICENSE | ||
Author: Manuel M T Chakravarty, | ||
Robert Clifton-Everest, | ||
Gabriele Keller, | ||
Sean Lee, | ||
Trevor L. McDonell | ||
Maintainer: Trevor L. McDonell <[email protected]> | ||
Bug-reports: https://github.com/AccelerateHS/accelerate/issues | ||
Homepage: https://github.com/AccelerateHS/accelerate-cuda/ | ||
|
||
Category: Compilers/Interpreters, Concurrency, Data, Parallelism | ||
Stability: Experimental | ||
|
||
Data-files: cubits/accelerate_cuda.h | ||
cubits/accelerate_cuda_assert.h | ||
cubits/accelerate_cuda_function.h | ||
cubits/accelerate_cuda_texture.h | ||
cubits/accelerate_cuda_type.h | ||
include/AccFFI.h | ||
|
||
Extra-tmp-files: config.status | ||
config.log | ||
autom4te.cache | ||
accelerate-cuda.buildinfo -- generated by configure | ||
|
||
Extra-source-files: configure | ||
accelerate-cuda.buildinfo.in | ||
include/accelerate.h | ||
|
||
Flag debug | ||
Description: | ||
Enable tracing message flags. These are read from the command-line | ||
arguments, which is convenient but may cause problems interacting with the | ||
user program, so is not enabled by default. The available options: | ||
. | ||
* -ddump-cc: print the generated code, kernel table management information, | ||
nvcc compiler warnings, and thread & resource statistics | ||
. | ||
* -ddebug-cc: compile code with debugging symbols, suitable for 'cuda-gdb' | ||
. | ||
* -ddump-exec: print each kernel name as it is invoked | ||
. | ||
* -ddump-gc: print memory management information | ||
. | ||
* -dverbose: other, uncategorised messages | ||
. | ||
* -fflush-cache: delete the persistent kernel cache | ||
. | ||
Default: False | ||
|
||
Flag bounds-checks | ||
Description: Enable bounds checking | ||
Default: True | ||
|
||
Flag unsafe-checks | ||
Description: Enable bounds checking in unsafe operations | ||
Default: False | ||
|
||
Flag internal-checks | ||
Description: Enable internal consistency checks | ||
Default: False | ||
|
||
Library | ||
Include-Dirs: include | ||
|
||
Build-depends: accelerate == 0.14.*, | ||
array >= 0.3, | ||
base == 4.6.*, | ||
binary >= 0.5 && < 0.7, | ||
-- binary 0.7 untested | ||
bytestring >= 0.9 && < 0.11, | ||
cryptohash >= 0.7 && < 0.12, | ||
cuda >= 0.5.1.1 && < 0.6, | ||
directory >= 1.0, | ||
fclabels >= 2.0 && < 2.1, | ||
filepath >= 1.0, | ||
hashable >= 1.1 && < 1.3, | ||
hashtables >= 1.0.1 && < 1.2, | ||
language-c-quote >= 0.4.4 && < 0.8, | ||
mainland-pretty >= 0.2 && < 0.3, | ||
mtl >= 2.0 && < 2.2, | ||
old-time >= 1.0, | ||
pretty >= 1.0, | ||
process >= 1.0, | ||
SafeSemaphore >= 0.9 && < 0.10, | ||
srcloc >= 0.2 && < 0.5, | ||
text >= 0.11 && < 0.12, | ||
template-haskell >= 2.2, | ||
transformers >= 0.2 && < 0.4, | ||
unordered-containers >= 0.1.4 && < 0.3 | ||
|
||
if os(windows) | ||
cpp-options: -DWIN32 | ||
build-depends: Win32 >= 2.2.1 | ||
else | ||
cpp-options: -DUNIX | ||
build-depends: unix >= 2.4 | ||
|
||
Exposed-modules: Data.Array.Accelerate.CUDA | ||
Data.Array.Accelerate.CUDA.Foreign | ||
|
||
Other-modules: Data.Array.Accelerate.CUDA.AST | ||
Data.Array.Accelerate.CUDA.Analysis.Device | ||
Data.Array.Accelerate.CUDA.Analysis.Launch | ||
Data.Array.Accelerate.CUDA.Array.Data | ||
Data.Array.Accelerate.CUDA.Array.Nursery | ||
Data.Array.Accelerate.CUDA.Array.Prim | ||
Data.Array.Accelerate.CUDA.Array.Sugar | ||
Data.Array.Accelerate.CUDA.Array.Table | ||
Data.Array.Accelerate.CUDA.Async | ||
Data.Array.Accelerate.CUDA.CodeGen | ||
Data.Array.Accelerate.CUDA.CodeGen.Base | ||
Data.Array.Accelerate.CUDA.CodeGen.IndexSpace | ||
Data.Array.Accelerate.CUDA.CodeGen.Mapping | ||
Data.Array.Accelerate.CUDA.CodeGen.Monad | ||
Data.Array.Accelerate.CUDA.CodeGen.PrefixSum | ||
Data.Array.Accelerate.CUDA.CodeGen.Reduction | ||
Data.Array.Accelerate.CUDA.CodeGen.Stencil | ||
Data.Array.Accelerate.CUDA.CodeGen.Stencil.Extra | ||
Data.Array.Accelerate.CUDA.CodeGen.Type | ||
Data.Array.Accelerate.CUDA.Compile | ||
Data.Array.Accelerate.CUDA.Context | ||
Data.Array.Accelerate.CUDA.Debug | ||
Data.Array.Accelerate.CUDA.Execute | ||
Data.Array.Accelerate.CUDA.Execute.Event | ||
Data.Array.Accelerate.CUDA.Execute.Stream | ||
Data.Array.Accelerate.CUDA.Foreign.Export | ||
Data.Array.Accelerate.CUDA.Foreign.Import | ||
Data.Array.Accelerate.CUDA.FullList | ||
Data.Array.Accelerate.CUDA.Persistent | ||
Data.Array.Accelerate.CUDA.State | ||
Data.Array.Accelerate.Internal.Check | ||
Paths_accelerate_cuda | ||
|
||
if flag(debug) | ||
cpp-options: -DACCELERATE_DEBUG | ||
|
||
if flag(bounds-checks) | ||
cpp-options: -DACCELERATE_BOUNDS_CHECKS | ||
|
||
if flag(unsafe-checks) | ||
cpp-options: -DACCELERATE_UNSAFE_CHECKS | ||
|
||
if flag(internal-checks) | ||
cpp-options: -DACCELERATE_INTERNAL_CHECKS | ||
|
||
ghc-options: -O2 | ||
-Wall | ||
-fwarn-tabs | ||
|
||
ghc-prof-options: -auto-all | ||
|
||
-- Don't add the extensions list here. Instead, place individual LANGUAGE | ||
-- pragmas in the files that require a specific extension. This means the | ||
-- project loads in GHCi, and avoids extension clashes. | ||
-- | ||
-- Extensions: | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/AccelerateHS/accelerate-cuda | ||
|