Closed stefan-apollo closed 8 months ago
Huh, pytest --runslow
gets some errors
FAILED tests/test_build_graph.py::test_modular_arithmetic_build_graph[(1-alpha)^2-functional-trapezoidal] - AssertionError: Tensor-likes are not close!
FAILED tests/test_build_graph.py::test_modular_arithmetic_build_graph[(1-0)*alpha-functional-trapezoidal] - AssertionError: Tensor-likes are not close!
FAILED tests/test_build_graph.py::test_modular_arithmetic_build_graph[(1-alpha)^2-squared-trapezoidal] - AssertionError: Tensor-likes are not close!
FAILED tests/test_build_graph.py::test_modular_arithmetic_build_graph[(1-0)*alpha-squared-trapezoidal] - AssertionError: Tensor-likes are not close!
FAILED tests/test_build_graph.py::test_modular_arithmetic_build_graph[jacobian-squared-trapezoidal] - AssertionError: Tensor-likes are not close!
FAILED tests/test_build_graph.py::test_modular_arithmetic_build_graph[jacobian-squared-gauss-legendre] - AssertionError: Tensor-likes are not close!
Oh these also fail on main, on an A100
Okay, ignore these failing tests. Tests pass on an A6000. Tracked in #339.
Save memory with better division
Credit to Nix who came up with this!
Description
Moving the
/normalization_factor
to after the einsum saves VRAM.Motivation and Context
Yay we can have more batch size!
How Has This Been Tested?
Ran pytest. Ran this config which works now, and OOM'ed before.
Does this PR introduce a breaking change?
No.