Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Plumbed in the lookup table from #123, and parametrized tests to compare performance.
TLDR: minimal effect on runtime on CPU/IPUModel, useful improvement in compile time.
Update: the above is on one machine/JAX combination. Others show less of an effect, sometimes inverted. We may prefer to leave this on a branch as an unconclusive experiment.
The improved compile time is probably because the jaxpr is more compact for the lookup case. We might hope that runtime on IPU will be good because the problem is converted to a simple matrix-vector multiply, but at 2*LMAX=8, meaning 128K of memory to store the dense LUT, it may be necessary to sparsely encode it, at which point, a simple C++ vertex implementation may be the better option.
The above results were generated with instrumented tests, but that instrumentation is removed for checkin - we don't want to run them all the time. That branch is at
pyscf-ipu/test/test_integrals.py
Line 99 in 777e096