Skip to content

Instantly share code, notes, and snippets.

View tmcdonell's full-sized avatar
🐙
coalescing

Trevor L. McDonell tmcdonell

🐙
coalescing
View GitHub Profile
> stack exec accelerate-nofib -- --llvm-cpu --maximum-generated-tests=10
accelerate-nofib (c) [2013] The Accelerate Team
Usage: accelerate-nofib [OPTIONS]
Available backends:
interpreter reference implementation (sequential)
* llvm-cpu LLVM based implementation for multicore CPUs (parallel)
llvm-ptx LLVM based implementation for NVIDIA GPUs (parallel)
import Data.Array.Accelerate as A
import Data.Array.Accelerate.LLVM.Native as CPU
-- import Data.Array.Accelerate.LLVM.PTX as PTX
import Criterion.Main
-- Same as: https://github.com/FrozenXZeus/HammingHaskellC/blob/ee1a69adc63c4cece4cb48f7192ccd4412031fb0/hamming-c/hamming.c
--
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
import Data.Array.Accelerate as A
import Data.Array.Accelerate.Debug as A
import Data.Array.Accelerate.Control.Lens
import Data.Array.Accelerate.Linear
import Data.Functor
; ModuleID = 'map'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-darwin15.6.0"
; Function Attrs: norecurse nounwind
define void @map(i64 %ix.start, i64 %ix.end, double* noalias nocapture %out.ad0, i64 %out.sh0, double* noalias nocapture readonly %fv0.ad0, i64 %fv0.sh0) local_unnamed_addr #0 {
entry:
%0 = icmp sgt i64 %ix.end, %ix.start
br i1 %0, label %while1.top.preheader, label %while1.exit
-- compile with:
-- ghc -Odph -rtsopts -threaded -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000 -fllvm -optlo-O3 -c -keep-llvm-files Test.hs
module Test where
import Prelude as P
import Data.Array.Repa as R
test1 :: Array U DIM1 Double -> IO (Array U DIM1 Double)
test1 xs = computeUnboxedP $ R.map (+1) xs
lol-apps/tests/KHPRFTests.hs:26:1: error:
• Could not deduce: (Crypto.Lol.Utils.GenArgs.ResultOf bnch0 :: *)
~~
(Test (*, *, *, *, *) '(t, m, zp, zq, gad) :: *)
from the context: (MonadRandom rnd,
(Crypto.Lol.Utils.GenArgs.ResultOf bnch :: *)
~~
(Test (*, *, *, *, *) '(t, m, zp, zq, gad) :: *),
(Crypto.Lol.Utils.GenArgs.ResultOf bnch2 :: *)
~~
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module MMult where
import Prelude as P
import Data.Array.Accelerate as A
#include <stdio.h>
#include "cuwrap.h"
/* C driver to test invocation of wrapped cuInit */
int main(int argc, char **argv)
{
int r;
printf("Running main.\n");
Configuring haskell-src-meta-0.6.0.13...
Building haskell-src-meta-0.6.0.13...
Preprocessing library haskell-src-meta-0.6.0.13...
[1 of 6] Compiling Language.Haskell.TH.Instances.Lift ( src/Language/Haskell/TH/Instances/Lift.hs, dist/dist-sandbox-b469674b/build/Language/Haskell/TH/Instances/Lift.o )
[2 of 6] Compiling Language.Haskell.Meta.Syntax.Translate ( src/Language/Haskell/Meta/Syntax/Translate.hs, dist/dist-sandbox-b469674b/build/Language/Haskell/Meta/Syntax/Translate.o )
src/Language/Haskell/Meta/Syntax/Translate.hs:349:43: error:
• Data constructor not in scope: IsStrict :: Bang
• Perhaps you meant ‘Strict’ (imported from Language.Haskell.TH.Syntax)
This file has been truncated, but you can view the full file.
; ModuleID = 'libdevice.compute_30.10.bc'
target triple = "nvptx-unknown-unknown"
%struct.uint2 = type { i32, i32 }
%struct.float2 = type { float, float }
%struct.ulonglong2 = type { i64, i64 }
%struct.double2 = type { double, double }
@__cudart_i2opi_f = internal addrspace(4) global [6 x i32] [i32 1011060801, i32 -614296167, i32 -181084736, i32 -64530479, i32 1313084713, i32 -1560706194], align 4
@__cudart_i2opi_d = internal addrspace(4) global [18 x i64] [i64 7780917995555872008, i64 4397547296490951402, i64 8441921394348257659, i64 5712322887342352941, i64 7869616827067468215, i64 -1211730484530615009, i64 2303758334597371919, i64 -7168499653074671557, i64 4148332274289687028, i64 -1613291254968254911, i64 -1692731182770600828, i64 -135693905287338178, i64 452944820249399836, i64 -5249950069107600672, i64 -121206125134887583, i64 -2638381946312093631, i64 -277156292786332224, i64 -6703182060581546711], align 8