Skip to content

Batchify all APIs #670

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 54 commits into from
May 19, 2025
Merged

Batchify all APIs #670

merged 54 commits into from
May 19, 2025

Conversation

JunchenLiu77
Copy link
Collaborator

@JunchenLiu77 JunchenLiu77 commented May 7, 2025

This PR updated all the existing APIs (3DGS, 2DGS, 3DGUT) to support multiple batch dimensions eg. [A, B, C] -> [..., A, B, C], which

  1. ensures backward compatibility.

  2. is tested with various batch dimension configurations.

Copy link
Collaborator

@liruilong940607 liruilong940607 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from skimming through it! I'll take a closer look later

@JunchenLiu77
Copy link
Collaborator Author

JunchenLiu77 commented May 9, 2025

benchmark batch feature with 10000 gaussians (profiling/batch.py)

Model N Batches Mem (GB) Time [fwd] Time [bwd]
3DGS 1 0.010 0.00037 0.00049
3DGS 4 0.040 0.00040 0.00079
3DGS 16 0.161 0.00093 0.00284
3DGS 64 0.642 0.00368 0.01124
3DGUT 1 0.010 0.00042 0.00070
3DGUT 4 0.040 0.00057 0.00128
3DGUT 16 0.162 0.00162 0.00513
3DGUT 64 0.641 0.00635 0.02031

@MrNeRF
Copy link
Contributor

MrNeRF commented May 9, 2025

Hey cool pr. Does this also work with bilateral grid? Is distributed computing (Grendel) supported?

@liruilong940607
Copy link
Collaborator

Hey cool pr. Does this also work with bilateral grid? Is distributed computing (Grendel) supported?

Hey there! This is just to update the rasterization function to support batch over multiple scenes (on top of our previous support for batch over multiple viewpoints).

bilateral grid already supports arbitrary batching on the final rendered images -- so yes it works with bilateral grid.

For Grendel, we already supported it in gsplat -- you could training a single scene with multiple GPUs by distributing the GSs. This PR addresses batching over multiple scenes (for the use cases of those feed-forward models) which is not quite relevant / orthogonal to Grendel.

@MrNeRF
Copy link
Contributor

MrNeRF commented May 9, 2025

Ok, got it! Thank you!

@JunchenLiu77
Copy link
Collaborator Author

0518.mov

Copy link
Collaborator

@liruilong940607 liruilong940607 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Awesome job JC for such huge effort!

@liruilong940607 liruilong940607 merged commit 1e26945 into main May 19, 2025
2 checks passed
@liruilong940607 liruilong940607 deleted the jc/batch branch May 19, 2025 07:56
@JunchenLiu77
Copy link
Collaborator Author

0518.mov

Fix bug in this video.

gsplat-batch.mp4

@JunchenLiu77 JunchenLiu77 restored the jc/batch branch May 19, 2025 08:31
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.

3 participants