Skip to content
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

OOM while trying to compile on Noir versions past 0.9.0 #3

Open
wwared opened this issue Oct 2, 2023 · 0 comments
Open

OOM while trying to compile on Noir versions past 0.9.0 #3

wwared opened this issue Oct 2, 2023 · 0 comments

Comments

@wwared
Copy link

wwared commented Oct 2, 2023

I've been trying to compile this codebase with newer versions of Noir, mainly trying with 0.11.1-aztec.0 (to try and deploy a contract using it in the sandbox) and 0.14.1, and I'm running into an out-of-memory issue, and just giving it more memory does not seem to be enough for it to compile.

Trying to narrow things down, it looks like one of the main culprits is Fp12 exponentiation, since I observe the OOM in tests test_fp12_final_exp and test_final_exponentiation, and not just when compiling the pairing function. I've commented out chunks of the final_exponentiate code to try and identify which specific calls make the compiler use so much memory, and landed in the Fp12::exponentiation function, which in my tests makes noir use over 900GiB of RAM during compilation before eventually running into a stack overflow if you give it enough RAM/swap space to keep running without OOMing.

I've also quickly tried other noir versions, and it seems like any version beyond 0.9.0 has issues compiling this code, so I'm guessing it's probably related to the SSA backend that was refactored and replaced in 0.10.0? I'm not sure if the code in this repo is just naturally leading to a large circuit that can't be compiled with the refactored codebase, or if there is something in how the code is written/organized that is making Fp12::exponentiation trigger some bug in the compiler.

Have you made any attempts at compiling with newer versions of Noir, or do you have any insight on the root cause of this memory regression?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant