New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sudden explosion in inlining depth needed #613
Comments
This behaviour is triggered by a data type that has a field with a function type, in this case the There's no (quick) fix to handle this in a non-exponential manner. I'm researching some new compile approaches that are (hopefully) significantly faster and consume less memory. Until then, the only work around is to avoid data types with fields that have a function type. |
Thanks for looking into this, it was really blocking me. I will look into alternative implementations for Two comments though:
|
I believe we looked into this before and concluded that, while it would work, the resulting HDL would look nothing like the source code thus frustrating debugging attempts. |
…Out, collect a partial overwrite of CPUOut as data (motivated by clash-lang/clash-compiler#613)
Summary: I have some CLaSH code where if I start using some seemingly innocent, non-recursive utility function, suddenly the inlining limit required to synthesize it shoots up through the roof.
I have made a simplified, cut-down version of my code for this ticket. First, the function that I want to use is the following:
The "good" version of my program, which doesn't use the above
FetchM
monad, and can be synthesized with aclash-inline-limit
of 50, no external dependencies:And then the "bad" version is the same, except the usage of
FetchM
is enabled incpu
:So then the problem with the "bad" version is that even in this small repro case, it takes an inlining depth of 200-250 (200 is not enough, 250 is enough) to properly eliminate intermediate values of function type. And in the real CLaSH code that I intend to use this in, I can't push the inlining depth high enough without the synthesizer running out of memory on my 24Gb notebook.
The text was updated successfully, but these errors were encountered: