Skip to content
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

Add AccThunk to avoid prematurely unthunking thunks #1562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pxl-th
Copy link
Member

@pxl-th pxl-th commented Mar 13, 2025

PR Checklist

  • Tests are added

@pxl-th pxl-th self-assigned this Mar 13, 2025
@pxl-th pxl-th requested review from mcabbott and ToucheSir March 13, 2025 10:57
@pxl-th pxl-th changed the title Add AccThunk Add AccThunk to avoid prematurely unthunking thunks Mar 13, 2025
@pxl-th
Copy link
Member Author

pxl-th commented Mar 13, 2025

Test failures are unrelated.

@ToucheSir ToucheSir closed this Mar 13, 2025
@ToucheSir ToucheSir reopened this Mar 13, 2025
@ToucheSir
Copy link
Member

Coming from #1555 (comment), I think we need at least one test that shows we aren't introducing new type instabilities when multiple paths try to accumulate different (un)thunked types.

@pxl-th
Copy link
Member Author

pxl-th commented Mar 13, 2025

Coming from #1555 (comment), I think we need at least one test that shows we aren't introducing new type instabilities when multiple paths try to accumulate different (un)thunked types.

IIUC you mean the case when AccThunk holds thunks of different type and if that leads to more type-instability -> worse performance?

I benchmarked GaussianSplatting.jl and its ~2x faster with AccThunk than without.

@ToucheSir
Copy link
Member

Yes. I'd expect any overhead from type instability to be a non-issue for GaussianSplatting.jl, because each operation is much larger and any AD bookkeeping overhead is relatively small. But for problems more sensitive to AD overhead, it would be good to have some numbers.

@pxl-th
Copy link
Member Author

pxl-th commented Mar 14, 2025

@ToucheSir do you have such a test in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants