Skip to content

Improve load balancing in DistributedPointsToGrid - #2276

Merged
kmuseth merged 3 commits into
AcademySoftwareFoundation:masterfrom
matthewdcong:improve_mgpu_load_balancing
Aug 12, 2026
Merged

Improve load balancing in DistributedPointsToGrid#2276
kmuseth merged 3 commits into
AcademySoftwareFoundation:masterfrom
matthewdcong:improve_mgpu_load_balancing

Conversation

@matthewdcong

@matthewdcong matthewdcong commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The existing DistributedPointsToGrid implementation sorts on each local range independently, followed by a pairwise merge tree to obtain a globally sorted range. The existing merge-tree approach halves the number of devices utilized at each step, which leaves the remaining GPUs idle.

This PR improves throughput by involving all the GPUs during the pairwise merge. At a high-level, instead of being limited to one GPU writing the left half of the output (sub)array and another GPU writing to the right half of the output (sub)array, we further subdivide the output (sub)array across all available GPUs so that each GPU writes a section of the output (sub)array. Moreover, this allows us to generalize the pairwise merge to non power-of- two GPU counts.

With 65,536 points sampled on a torus on two RTX 3090s, this improves end-to-end construction time by 8%.

@matthewdcong
matthewdcong requested a review from kmuseth as a code owner August 10, 2026 15:38

@kmuseth kmuseth 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 okay to me but it's a lot of code changes for merely an 8% performance improvement. Can you try to run this on a more recent GPU thanks a 3090? I wonder if you have two GPUs connected via PCI-e will change the picture?

@swahtz swahtz added the nanovdb label Aug 11, 2026
@matthewdcong
matthewdcong force-pushed the improve_mgpu_load_balancing branch from bab4732 to 56e3451 Compare August 11, 2026 15:28
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
@matthewdcong
matthewdcong force-pushed the improve_mgpu_load_balancing branch from 56e3451 to d0e7fa6 Compare August 11, 2026 19:23
@kmuseth
kmuseth merged commit 6717cca into AcademySoftwareFoundation:master Aug 12, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants