Skip to content

Use LayoutRight for distances and indices in partial_sort#72

Merged
keichi merged 1 commit intomasterfrom
layout-right-partial-sort
Jan 6, 2026
Merged

Use LayoutRight for distances and indices in partial_sort#72
keichi merged 1 commit intomasterfrom
layout-right-partial-sort

Conversation

@keichi
Copy link
Copy Markdown
Owner

@keichi keichi commented Jan 6, 2026

Summary

  • Add TmpIndices type with LayoutRight layout for GPU coalesced access
  • Modify partial_sort, full_sort, and full_sort_with_scratch to take TmpDistances and TmpIndices directly instead of SimplexLUT
  • Remove unnecessary deep_copy from TmpDistances to SimplexLUT in ccm()

- Add TmpIndices type with LayoutRight layout for GPU coalesced access
- Modify partial_sort, full_sort, and full_sort_with_scratch to take
  TmpDistances and TmpIndices directly instead of SimplexLUT
- Remove unnecessary deep_copy from TmpDistances to SimplexLUT in ccm()
- Update ccm_test to use the new function signatures

This improves GPU performance by ensuring coalesced memory access
patterns in the j dimension during partial sorting operations.
@keichi keichi merged commit fb57ef4 into master Jan 6, 2026
10 checks passed
@keichi keichi deleted the layout-right-partial-sort branch January 6, 2026 07:49
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.

1 participant