Skip to content

Fix/improve radix sort synchronization#409

Merged
matthewdcong merged 1 commit into
openvdb:mainfrom
matthewdcong:improve_radix_sort_sync
Jan 14, 2026
Merged

Fix/improve radix sort synchronization#409
matthewdcong merged 1 commit into
openvdb:mainfrom
matthewdcong:improve_radix_sort_sync

Conversation

@matthewdcong

Copy link
Copy Markdown
Contributor

The item offsets and counts arrays are only accessed on the host. Prior to this PR, these were allocated in Unified Memory without the appropriate synchronization. This leads to a rare race condition and also necessitates additional host-device synchronization at the beginning of the radix sort loop. Migrating these arrays to the host fixes the race condition and removes the need to synchronize.

@matthewdcong matthewdcong requested a review from a team as a code owner January 12, 2026 23:16
Signed-off-by: Matthew Cong <mcong@nvidia.com>
@matthewdcong matthewdcong force-pushed the improve_radix_sort_sync branch from efd7723 to 6d64f35 Compare January 12, 2026 23:16

@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.

That's great, thanks!

@matthewdcong matthewdcong merged commit 0715c87 into openvdb:main Jan 14, 2026
32 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.

2 participants