-
Notifications
You must be signed in to change notification settings - Fork 26
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
xla memory leak on compiled jax function #1484
Comments
Issue does not occur when you ADD force balance objective
|
looks like it might just be an OOM issue? Does it happen if you reduce the resolution a lot? It likely doesn't happen with force balance inclued bc in that case its only taking derivatives wrt the boundary stuff, not the full internal dofs |
also which branch was this on |
This was on #1290 |
This is different than the previous issue, right? The one that Rory solved by changing how we flatten |
I think this is just OOM issue as Rory said. I get the same error on the first run (WSL uses 12GB of memory). But I don't get the error if I use Still, running the same code shouldn't re-compile anything, but maybe this is on the edge and one tiny extra recompilation cause it to OOM. I am not sure. |
Well the first run is <=5gb of memory on my machine. After compile the error message states that it wanted to allocate > 200gb. That indicates a memory leak to me. This memory leak does not occur when I ADD force balance. |
To the constraints? Or objective? |
constraints, didn't try objective |
Well when you add Force balance to the constraints, the Jacobian size reduces to 5x24, but without it, it is 5x1617. I get the OOM even in the first run with the same message (>200GB), so I am not sure what 200Gb is. |
And the warning at the top basically says that you don't have non-linear constraints, so it won't use |
Also I realized that error occurs here, which is after the jacobian calculation. Could it be a problem with Same error happens if you add |
@unalmis Can you try running with these changes here, Line 396 in 34dbac0
# if optimality is None or abs(optimality) == np.inf:
# optimality = " " * 15
# else:
# optimality = "{:^15.3e}".format(optimality)
optimality = " " * 15 This made me able to run it once, but the second run fails again, same error message but for different line. |
The error message,
|
Paste this into a jupyter cell block and run twice. On the second run once the function is compiled an xla runtime error will be raised.
The text was updated successfully, but these errors were encountered: