Skip to content

refactor(topk): simplify the public API - #99

Open
VAthree wants to merge 1 commit into
Tencent:mainfrom
VAthree:refactor/topk-public-api
Open

refactor(topk): simplify the public API#99
VAthree wants to merge 1 commit into
Tencent:mainfrom
VAthree:refactor/topk-public-api

Conversation

@VAthree

@VAthree VAthree commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Expose the exact row-wise Top-K operator as hpc.topk and align its
workspace query helpers with the same concise name:

  • hpc.topk_workspace_size
  • hpc.topk_min_workspace_size
  • hpc.topk_peak_workspace_size

Rename the focused test module to tests/test_topk.py and update its
call sites to use the new API.

The native operator schemas and CUDA implementation remain unchanged;
this PR only simplifies the public Python interface.

Expose the operator as hpc.topk and align the public workspace
query helpers with the same concise name. Keep the internal torch
schemas and CUDA implementation unchanged.

Rename the focused test module and update callers to the new API.
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