Opened 11 months ago

Last modified 11 months ago

#15751 new bug

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

Reported by: tdammers Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.2
Keywords: Cc: tmcdonell
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time performance bug Test Case: Compile `Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith` from `accelerate-1.2.0`
Blocked By: Blocking:
Related Tickets: #15488 Differential Rev(s):
Wiki Page:

Description

In #15488, 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, this problem seems to trace back to GHC 8.0.2 at least, possibly further.

Change History (1)

comment:1 Changed 11 months ago by tmcdonell

Cc: tmcdonell added
Note: See TracTickets for help on using tickets.