Skip to content

GHC takes huge amounts of memory and compile time when compiling ZipWith from accelerate

In #15488 (closed), we found that GHC takes huge amounts of memory by building up excessively large amounts of Core. Looking a the Data.Array.Accelerate.Analysis.Hash module there, the problem seems to be due to excessive (and unproductive) inlining.

However, the Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith module *also* takes a very large amount of time and memory to compile, and while it also builds up huge amounts of Core in unproductive ways, the blowup happens in a different step.

https://github.com/AccelerateHS/accelerate/issues/428#issuecomment-425019263 has a build log that points at the first round of Specialise as the culprit.

Just like #15488 (closed), this problem seems to trace back to GHC 8.0.2 at least, possibly further.

Trac metadata
Trac field Value
Version 8.0.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information