[FEA] Expose algorithm selection in `matrix.select_k` python API
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the pylibraft.matrix.select_k Python API and compare its signature with the C++ select_k API, especially the SelectAlgo argument and available enum values. Trace the Python binding and any associated tests, then verify that callers can choose the algorithm and that the selected option reaches the C++ implementation.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
The current python API (here) in pylibraft.matrix.select_k does not expose the algorithm selection that the C++ API does, see here. Instead it uses the default value which automatically selects the algorithm.
Describe the solution you'd like
I'd suggest passing an extra enum argument to the function that allows selecting the algorithm similar to the C++ API.
Describe alternatives you've considered
In a benchmark, the default automatic algorithm performs poorly (~10X slower) than the AIR-TopK reported in this paper. Using the C++ API, I can reproduce the same timings reported in the paper when choosing raft::matrix::SelectAlgo::kRadix11bits algorithm.
Additional context
C++ documentation is provided here.
- Dominant language
- Cuda
- Stars
- 1.1k
- Forks
- 260
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 21
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing 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.
More from NVIDIA/raft
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
[BUG] Half-precision gemm fails with CUBLAS_STATUS_NOT_SUPPORTED when A or B is not 16-byte alignedOpenbug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
[BUG] A column with one infinity sums to NaN in `raft::stats::sum`Possibly taken @galleonli claimed this 4 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
[FEA] Return centers generated by raft::random::make_blobsPossibly taken @NIne-WIngEd claimed this 36 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 53/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nicobailon/pi-subagents#3425 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jelmer/buildlog-consultant#364 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day