You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v0.6.4: Chamfer Distance Numerical Stabilization & NaN Elimination
Chamfer & Hausdorff Distance Numerical Stabilization & NaN Elimination:
Replaced raw thrust::device_vector system cudaMalloc allocations with PyTorch CUDACachingAllocator device tensors, preventing CUDA memory allocator aborts under GPU memory pressure.
Implemented dedicated single-reference CUDA kernel (one_sided_chamfer_single_point_kernel) computing direct $O(N)$ squared distances without KD-Tree construction overhead for $M=1$.
Added robust empty-set safeguards for $N=0$ and $M=0$, preventing __builtin_clz(0) undefined behavior and cudaErrorInvalidConfiguration kernel launch crashes.
Applied critically small $\epsilon = 10^-26$ numerical clamp (torch.clamp(distances, min=1e-26)) before torch.sqrt() to eliminate NaN artifacts from negative sub-normal floating-point drift.
Guarded priority queue insertion in kdtree::query_kdtree_loop against non-finite float coordinates.
Refactors & Build
PyBind11 Dispatcher: Handled $N=0$ and $M=0$ gracefully in C++ PyBind wrapper returning valid pre-allocated empty/infinite tensors.
Version Bump: Bumped version to 0.6.4 in pyproject.toml.
Examples
Standalone verification suite in scratch/verify_chamfer_nan_fixes.py validating 100% numerical parity against PyTorch cdist across empty, single-point, identical, and large-scale random point clouds.