Which sorting algorithm does TensorFlow use?

Viewed 174

I'm trying to figure out how TensorFlow's sort function works.

I've looked in the docs and tried to find in the source code without luck.

The function is tf.contrib.framework.sort(values)? 1

1 Answers

From the sort source code, this is the line where the actual sort operation is called. The topk op is actually part of the core kernels and is written in C/C++. This is the corresponding source code for it. A quick high level glance seems to employ some form of heap sort.

Related