Skip to content
Discussion options

You must be logged in to vote

If it's CPU you're curious about, you can find the implementation here: https://github.com/openxla/xla/blob/f868730d8fc557f9e26c983a015f6b63d5b241b4/xla/service/cpu/runtime_topk.cc#L27-L69

It looks like it's implemented via C++ std:partial_sort.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jakevdp
Comment options

@xhluca
Comment options

@jakevdp
Comment options

@jakevdp
Comment options

Answer selected by xhluca
@xhluca
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants