8000 Exploit band-diagonal structure in quasisep transitions for better scaling by dfm · Pull Request #240 · dfm/tinygp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Exploit band-diagonal structure in quasisep transitions for better scaling #240

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

Merged
merged 2 commits into from
Jul 8, 2025

Conversation

dfm
Copy link
Owner
@dfm dfm commented Jul 2, 2025

This PR builds on the fact that most real applications of quasiseparable kernels have internal block diagonal structure. If we ignore this fact than the computational cost scales as the cube of the model "width" (approximately the number of kernel terms), but we can get better scaling (quadratic in width) if we exploit this structure.

Here is the scaling in model width before and after this change:

runtime

As expected, for wide models, this makes a dramatic difference in the runtime performance.

I'll note that we do end up paying a non-trivial compile time cost:

compile

But I think that that's probably worth it.

(Note that in all these examples I've set the environment variable: XLA_FLAGS=--xla_backend_extra_options=xla_cpu_small_while_loop_byte_threshold=1000000.)

In this PR, I'll enable the new behavior by default, but we could consider adding an option to disable it.

@dfm dfm merged commit 190c0ec into main Jul 8, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

1 participant
0