Hello,
I would like to run accelerate-llvm-ptx in docker and wonder if someone has already made a similar setup.
I have tried using
this image and managed to compile a small test program, however when I try to run it, I face the following error:
```
Status.toEnum: Cannot match -1
CallStack (from HasCallStack):
error, called at src/Foreign/CUDA/Driver/Error.chs:447:22 in cuda-0.10.2.0-5kq7o4KpIm3ID4z36ZWUtH:Foreign.CUDA.Driver.Error
```
Nvidia container toolkit is installed, the setup is tested with
```
sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:10.2-base-ubuntu18.04 nvidia-smi
```
For some context, the host is ubuntu 22.04;
contents of stack.yaml:
```
resolver: lts-18.19
packages:
- .
extra-deps:
- accelerate-1.3.0.0
- accelerate-llvm-1.3.0.0
- accelerate-llvm-native-1.3.0.0
- accelerate-llvm-ptx-1.3.0.0
- cuda-0.10.2.0
- nvvm-0.10.0.0
flags:
llvm-hs:
shared-llvm: true
ghc-options:
llvm-hs: -optcxx=-std=c++11
```
and I am testing with a small program
```
import Data.Array.Accelerate as A
import qualified Data.Array.Accelerate.LLVM.Native as Native
import qualified Data.Array.Accelerate.LLVM.PTX as GPU
a = A.fromList (A.Z A.:. 10) [0..] :: A.Vector Float
b = A.fromList (A.Z A.:. 10) [1..] :: A.Vector Float
dotp :: A.Acc (A.Vector Float) -> A.Acc (A.Vector Float) -> A.Acc (A.Scalar Float)
dotp xs ys = A.fold (A.+) 0 (A.zipWith (A.*) xs ys)
main :: IO ()
main = do
let ap = dotp (A.use a) (A.use b)
let p = GPU.run ap
print p
```
If anyone has a working docker setup, it would be really great! However, suggestions on what I can try to resolve the error are also welcome.
Best regards,
Anatoliy