Skip to content

Instantly share code, notes, and snippets.

@cartazio
Created February 22, 2014 07:51
Show Gist options
  • Save cartazio/9150170 to your computer and use it in GitHub Desktop.
Save cartazio/9150170 to your computer and use it in GitHub Desktop.
4 of 4] Compiling Numerical.OpenBLAS.BLAS ( src/Numerical/OpenBLAS/BLAS.hs, dist/build/Numerical/OpenBLAS/BLAS.o )
src/Numerical/OpenBLAS/BLAS.hs:41:44:
A pattern match on a GADT requires GADTs or TypeFamilies
In the pattern: SRow
In the pattern: DenseMatrix SRow _ _ _ _
In an equation for ‛encodeNiceOrderHelper’:
encodeNiceOrderHelper (DenseMatrix SRow _ _ _ _)
= encodeOrder BLASRowMajor
src/Numerical/OpenBLAS/BLAS.hs:89:58:
Could not deduce (m ~ (->) (GHC.Ptr.Ptr el -> GHC.Ptr.Ptr el))
from the context (SM.Storable el, PrimMonad m)
bound by the type signature for
gemmAbstraction :: (SM.Storable el, PrimMonad m) =>
GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
at src/Numerical/OpenBLAS/BLAS.hs:(87,19)-(88,130)
‛m’ is a rigid type variable bound by
the type signature for
gemmAbstraction :: (SM.Storable el, PrimMonad m) =>
GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
at src/Numerical/OpenBLAS/BLAS.hs:87:19
Relevant bindings include
go :: forall (t :: Orientation)
(t1 :: Orientation)
a1
a2
a3
(x :: Orientation).
(m ~ (->) (GHC.Ptr.Ptr a1 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a2 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a3 -> GHC.Ptr.Ptr el), SM.Storable a3,
SM.Storable a2, SM.Storable a1) =>
Transpose
-> Transpose
-> el
-> el
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) x a1
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t a2
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t1 a3
-> m a
(bound at src/Numerical/OpenBLAS/BLAS.hs:91:5)
constHandler :: el -> (scale -> m a) -> m a
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:43)
gemmUnsafeFFI :: GemmFunFFI scale el
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:29)
gemmSafeFFI :: GemmFunFFI scale el
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:17)
gemmAbstraction :: GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:1)
In the expression: go
In an equation for ‛gemmAbstraction’:
gemmAbstraction gemmSafeFFI gemmUnsafeFFI constHandler
= go
where
go
tra
trb
alpha
beta
a@(MutableDenseMatrix ornta ax ay astride abuff)
b@(MutableDenseMatrix orntb bx by bstride bbuff)
c@(MutableDenseMatrix orntc cx cy cstride cbuff)
| isBadGemm tra trb ax ay bx by cx cy
= error
$!
"bad dimension args to GEMM: ax ay bx by cx cy: "
++ show [ax, ....]
| otherwise
= do { ap <- unsafeWithPrim abuff;
.... }
shouldCallFast :: Int -> Int -> Int -> Bool
shouldCallFast cy cx ax = flopsThreshold >= gemmComplexity cy cx ax
src/Numerical/OpenBLAS/BLAS.hs:89:58:
Could not deduce (a ~ ())
from the context (SM.Storable el, PrimMonad m)
bound by the type signature for
gemmAbstraction :: (SM.Storable el, PrimMonad m) =>
GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
at src/Numerical/OpenBLAS/BLAS.hs:(87,19)-(88,130)
‛a’ is a rigid type variable bound by
the type signature for
gemmAbstraction :: (SM.Storable el, PrimMonad m) =>
GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
at src/Numerical/OpenBLAS/BLAS.hs:87:19
Expected type: GemmFun el orient (PrimState m) m
Actual type: Transpose
-> Transpose
-> el
-> el
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) orient el
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) orient el
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) orient el
-> m a
Relevant bindings include
go :: forall (t :: Orientation)
(t1 :: Orientation)
a1
a2
a3
(x :: Orientation).
(m ~ (->) (GHC.Ptr.Ptr a1 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a2 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a3 -> GHC.Ptr.Ptr el), SM.Storable a3,
SM.Storable a2, SM.Storable a1) =>
Transpose
-> Transpose
-> el
-> el
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) x a1
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t a2
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t1 a3
-> m a
(bound at src/Numerical/OpenBLAS/BLAS.hs:91:5)
constHandler :: el -> (scale -> m a) -> m a
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:43)
gemmAbstraction :: GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:1)
In the expression: go
In an equation for ‛gemmAbstraction’:
gemmAbstraction gemmSafeFFI gemmUnsafeFFI constHandler
= go
where
go
tra
trb
alpha
beta
a@(MutableDenseMatrix ornta ax ay astride abuff)
b@(MutableDenseMatrix orntb bx by bstride bbuff)
c@(MutableDenseMatrix orntc cx cy cstride cbuff)
| isBadGemm tra trb ax ay bx by cx cy
= error
$!
"bad dimension args to GEMM: ax ay bx by cx cy: "
++ show [ax, ....]
| otherwise
= do { ap <- unsafeWithPrim abuff;
.... }
shouldCallFast :: Int -> Int -> Int -> Bool
shouldCallFast cy cx ax = flopsThreshold >= gemmComplexity cy cx ax
src/Numerical/OpenBLAS/BLAS.hs:112:32:
Could not deduce (a ~ ())
from the context (SM.Storable el, PrimMonad m)
bound by the type signature for
gemmAbstraction :: (SM.Storable el, PrimMonad m) =>
GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
at src/Numerical/OpenBLAS/BLAS.hs:(87,19)-(88,130)
or from (m ~ (->) (GHC.Ptr.Ptr a1 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a2 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a3 -> GHC.Ptr.Ptr el),
SM.Storable a3,
SM.Storable a2,
SM.Storable a1)
bound by the inferred type of
go :: (m ~ (->) (GHC.Ptr.Ptr a1 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a2 -> GHC.Ptr.Ptr el),
m ~ (->) (GHC.Ptr.Ptr a3 -> GHC.Ptr.Ptr el), SM.Storable a3,
SM.Storable a2, SM.Storable a1) =>
Transpose
-> Transpose
-> el
-> el
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) x a1
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t a2
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t1 a3
-> m a
at src/Numerical/OpenBLAS/BLAS.hs:(91,5)-(112,33)
‛a’ is a rigid type variable bound by
the type signature for
gemmAbstraction :: (SM.Storable el, PrimMonad m) =>
GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
at src/Numerical/OpenBLAS/BLAS.hs:87:19
Relevant bindings include
go :: Transpose
-> Transpose
-> el
-> el
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) x a1
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t a2
-> MutDenseMatrix (PrimState GHC.Ptr.Ptr) t1 a3
-> m a
(bound at src/Numerical/OpenBLAS/BLAS.hs:91:5)
constHandler :: el -> (scale -> m a) -> m a
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:43)
gemmAbstraction :: GemmFunFFI scale el
-> GemmFunFFI scale el
-> (el -> (scale -> m a) -> m a)
-> forall (orient :: Orientation).
GemmFun el orient (PrimState m) m
(bound at src/Numerical/OpenBLAS/BLAS.hs:89:1)
In the first argument of ‛return’, namely ‛()’
In a stmt of a 'do' block: return ()
carter code/hopenblas ‹master*› »
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment