AccelerateHS / AccelerateHS/accelerate

[BUG] Runtime error with llvm-ptx backend: double free or corruption (!prev)

オープン
#532 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Haskell
スター
1k
フォーク
135
PR マージ指標
30日以内にマージされた PR はありません

説明

**Description**

I'm seeing the following runtime error in a minimal example intended to generate a 2D array, when run with the `accelerate-llvm-ptx` backend. The error is

```
double free or corruption (!prev)
```

and coincides by the process dying with SIGABRT.

The behavior seems to be dependent on the size of the generated array. On my machine, there is no error for sizes smaller than 363; for 363 and larger I get the runtime error.

**Steps to reproduce**

1. Use the following `Main.hs`
``` haskell
module Main where

import Data.Array.Accelerate as A
import qualified Data.Array.Accelerate.LLVM.PTX as GPU

indices :: Exp Int -> Acc (Array DIM2 (Int, Int))
indices n = generate (I2 n n) unindex2

run :: Int -> IO ()
run =
writeFile "out"
. show
. GPU.run
. indices
. constant

main :: IO ()
main = run 363 -- <= 362 succeeds
```

1. Compile with `ghc Main.hs -threaded`
1. Run with `./Main`

(The complete code along with cabal file and Nix files is in this [gist](https://gist.github.com/mcwitt/8065817084a202e72b6c27090432ce28#file-main-hs).)

**Expected behaviour**
The sample code should not fail with `double free or corruption (!prev)`, regardless of the size of the generated array (at least for reasonable sizes).

**Your environment**

- Accelerate: 1.3.0.0
- Accelerate backend(s): accelerate-llvm-ptx 1.3.0.0
- GHC: 8.10.7
- OS: Linux
- Output of `nvidia-device-query`: https://gist.github.com/mcwitt/8065817084a202e72b6c27090432ce28#file-nvidia-device-query

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。