[FEA] Pairiwse distances to support computing triangular and symmetrizing
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
Currently, our pairwise distsnces computaiton exhaustively materializes the full n^2 matrix with n^2 complexity. But for symmetric distances, we can skip half the computations, taking the overall complexity down to n^2/2. We are finding users are seeing exactly 2x higher runtime than expected.
Scipy also has a dedicated option for being able to do this, and this feature will be useful for cupy.distance (which uses cuVS).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the pairwise distances computation entry point and review how it currently materializes the full matrix. Compare the requested behavior with SciPy's triangular and symmetrizing option, then verify that symmetric inputs avoid redundant computations while producing the expected distance matrix for cupy.distance users.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100