Skip to content

Improve prefetch granularity for rasterization kernels#665

Merged
matthewdcong merged 2 commits into
openvdb:mainfrom
matthewdcong:improve_rasterization_prefetch
Jun 8, 2026
Merged

Improve prefetch granularity for rasterization kernels#665
matthewdcong merged 2 commits into
openvdb:mainfrom
matthewdcong:improve_rasterization_prefetch

Conversation

@matthewdcong

Copy link
Copy Markdown
Contributor

Prior to this PR, we prefetched image-space tensors with camera granularity. That is, if an image in a camera was rendered across multiple GPUs, each GPU would prefetch the entire image. This is overly conservative and increases the amount of bandwidth required.

This PR refines that prefetching to have better granularity by prefetching on the tiles rendered by each GPU. This reduces the amount of cross-device traffic and leads to an approximately 5% speedup on 2x RTX 3090s for training.

@matthewdcong matthewdcong requested a review from a team as a code owner June 3, 2026 19:13
@matthewdcong matthewdcong force-pushed the improve_rasterization_prefetch branch from 1b756fb to 979d58a Compare June 3, 2026 19:13
Comment thread src/fvdb/detail/utils/cuda/Prefetch.cpp

@swahtz swahtz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall it looks good, I think we should just add a few gtests for the logic in Prefetch's appendPerTileImageRanges to make sure we don't have any silent regressions in logic before we merge this.

Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
@matthewdcong matthewdcong force-pushed the improve_rasterization_prefetch branch from d754157 to 6342627 Compare June 8, 2026 05:37

@swahtz swahtz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, thanks for adding those tests!

@matthewdcong matthewdcong merged commit d007635 into openvdb:main Jun 8, 2026
48 of 49 checks passed
@swahtz swahtz added this to the v0.5 milestone Jun 16, 2026
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.

2 participants