You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some nonlinear equations (or boundary conditions) lead to NaNs after optimization on GPU. As shown in the MRE below, the equation u(x) ~ 0 works on GPU (and CPU, not shown), but the equation u(x)^2 ~ 0 only works on CPU, not GPU. The same is true for the boundary conditions u(0) ~ 0 and u(0)^2 ~ 0.
Expected behavior
If a PDESystem works on CPU, it should also work on GPU. Equations that are nonlinear in the dependent variable shouldn't result in NaN. Users should be able to specify the equivalent boundary conditions u(0) ~ 0 and u(0)^2 ~ 0 and get similar results.
Environment (please complete the following information):
Output of using Pkg; Pkg.status()
Status `~/julia_projects/NeuralPDEtests/Project.toml`
[b0b7db55] ComponentArrays v0.15.19
⌃ [b2108857] Lux v1.2.3
[d0bbae9a] LuxCUDA v0.3.3
[961ee093] ModelingToolkit v9.51.0
[315f7962] NeuralPDE v5.17.0
[7f7a1694] Optimization v4.0.5
[42dfb2eb] OptimizationOptimisers v0.3.4
Info Packages marked with ⌃ have new versions available and may be upgradable.
Output of using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
I've done a bit more digging and it's more complicated than just "nonlinear" vs. "linear". In particular terms like u(x) * Dx(u(x)) or Dx(u(x)^2) don't cause an issue, but u(x)^2 * Dx(u(x)) and Dx(u(x)^3) do.
Describe the bug 🐞
Some nonlinear equations (or boundary conditions) lead to NaNs after optimization on GPU. As shown in the MRE below, the equation
u(x) ~ 0
works on GPU (and CPU, not shown), but the equationu(x)^2 ~ 0
only works on CPU, not GPU. The same is true for the boundary conditionsu(0) ~ 0
andu(0)^2 ~ 0
.Expected behavior
If a PDESystem works on CPU, it should also work on GPU. Equations that are nonlinear in the dependent variable shouldn't result in NaN. Users should be able to specify the equivalent boundary conditions
u(0) ~ 0
andu(0)^2 ~ 0
and get similar results.Minimal Reproducible Example 👇
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
@ChrisRackauckas, we spoke about this on a call on Thursday. It prevents GPU support for NeuralLyapunov in all but the simplest cases.
The text was updated successfully, but these errors were encountered: