AccelerateHS / AccelerateHS/accelerate

[BUG] Compilation errors in accelerate-io

Open
#566 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1k
Forks
135
PR merge metrics
No merged PRs in 30d

Description

Hi! Thanks for trying out Accelerate! We are sorry that you ran into trouble ): Please fill in the following report to help us fix the problem.

**Description**

I'm trying to compile accelerate-io in order to convert my `Vector.Unboxed` to accelerate vectors. I'm getting the following output:

```
accelerate-io-vector> src/Data/Array/Accelerate/IO/Data/Primitive/ByteArray.hs:49:52: error: [GHC-88464]
accelerate-io-vector> Variable not in scope:
accelerate-io-vector> unsafeCoerce# :: MutableByteArray# RealWorld -> ByteArray#
accelerate-io-vector> |
accelerate-io-vector> 49 | (# s2, ForeignPtr (byteArrayContents# (unsafeCoerce# mba#)) (PlainPtr mba#) #) }}
accelerate-io-vector> | ^^^^^^^^^^^^^
accelerate-io-vector> src/Data/Array/Accelerate/IO/Data/Primitive/ByteArray.hs:51:64: error: [GHC-88464]
accelerate-io-vector> Variable not in scope:
accelerate-io-vector> unsafeCoerce# :: ByteArray# -> MutableByteArray# RealWorld
accelerate-io-vector> |
accelerate-io-vector> 51 | _ -> (# s, ForeignPtr (byteArrayContents# ba#) (PlainPtr (unsafeCoerce# ba#)) #)
accelerate-io-vector> | ^^^^^^^^^^^^^
accelerate-io-vector> [2 of 7] Compiling Data.Array.Accelerate.IO.Data.Vector.Generic.Mutable ( src/Data/Array/Accelerate/IO/Data/Vector/Generic/Mutable.hs, dist/build/Data/Array/Accelerate/IO/Data/Vector/Generic/Mutable.o, dist/build/Data/Array/Accelerate/IO/Data/Vector/Generic/Mutable.dyn_o )
accelerate-io-vector> [3 of 7] Compiling Data.Array.Accelerate.IO.Data.Vector.Generic ( src/Data/Array/Accelerate/IO/Data/Vector/Generic.hs, dist/build/Data/Array/Accelerate/IO/Data/Vector/Generic.o, dist/build/Data/Array/Accelerate/IO/Data/Vector/Generic.dyn_o )
accelerate-io-vector> [6 of 7] Compiling Data.Array.Accelerate.IO.Data.Vector.Storable ( src/Data/Array/Accelerate/IO/Data/Vector/Storable.hs, dist/build/Data/Array/Accelerate/IO/Data/Vector/Storable.o, dist/build/Data/Array/Accelerate/IO/Data/Vector/Storable.dyn_o )
accelerate-io-vector> src/Data/Array/Accelerate/IO/Data/Vector/Storable.hs:68:21: error: [GHC-83865]
accelerate-io-vector> • Couldn't match type ‘[Char]’
accelerate-io-vector> with ‘text-2.1.3:Data.Text.Internal.Builder.Builder’
accelerate-io-vector> Expected: text-2.1.3:Data.Text.Internal.Builder.Builder
accelerate-io-vector> Actual: String
accelerate-io-vector> • In the first argument of ‘boundsCheck’, namely ‘"shape mismatch"’
accelerate-io-vector> In the first argument of ‘($)’, namely
accelerate-io-vector> ‘boundsCheck "shape mismatch" (vsize `quot` w == size sh)’
accelerate-io-vector> In the expression:
accelerate-io-vector> boundsCheck "shape mismatch" (vsize `quot` w == size sh)
accelerate-io-vector> $ unsafePerformIO $ newUniqueArray fp
accelerate-io-vector> 68 | = boundsCheck "shape mismatch" (vsize `quot` w == size sh)
accelerate-io-vector> | ^^^^^^^^^^^^^^^^
```

**Your environment**
Include any relevant details about the environment you experienced the bug in. When reporting the versions of Accelerate packages used, include either the release number or the commit SHA if building from source.

If the bug is with the `accelerate-llvm-ptx` GPU backend, include the output of `nvidia-device-query`

- Accelerate: 1.4.0.0
- Accelerate backend(s): irrelevant
- GHC: 9.10.3
- OS: NixOS

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.