Skip to content

Fix KNN query capacity for decoder interpolation - #13

Open
mulyoved wants to merge 1 commit into
nicehuster:masterfrom
mulyoved:fix/knnquery-256-capacity
Open

Fix KNN query capacity for decoder interpolation#13
mulyoved wants to merge 1 commit into
nicehuster:masterfrom
mulyoved:fix/knnquery-256-capacity

Conversation

@mulyoved

@mulyoved mulyoved commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • raise the KNN query kernel capacity from 100 to the decoder's required 256 neighbors
  • reject unsupported neighbor counts before CUDA launch
  • add GPU regression coverage for 256-neighbor success and 257-neighbor rejection

Root cause

The decoder requests 256 neighbors while the CUDA kernel allocates fixed arrays for 100. The kernel writes past both arrays, corrupts returned indexes, and later triggers a PyTorch index-out-of-bounds assertion in interpolation. Clamping the corrupted indexes would hide the memory error, so this change fixes the capacity mismatch at its source.

Verification

  • the 256-neighbor test failed on the unmodified upstream commit for the reproduced invalid-index reason
  • both focused GPU tests pass after the fix on CUDA 11.1 and PyTorch 1.10
  • the released Phase 1 sample completes inference, produces the expected NumPy output contract, and renders successfully on a Tesla T4

Fixes #7

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.

Pointops error

1 participant