Poplar and PopLibs
|
Functions for finding the top k elements. More...
#include <poplar/Graph.hpp>
#include <poplar/Program.hpp>
#include <poplar/Tensor.hpp>
#include <popops/SortOrder.hpp>
Go to the source code of this file.
Classes | |
struct | popops::TopKParams |
Parameters for topK* APIs. More... | |
Namespaces | |
namespace | popops |
Common functions, such as elementwise and reductions. | |
Functions | |
poplar::Tensor | popops::createTopKInput (poplar::Graph &graph, const poplar::Type &type, const std::vector< std::size_t > &shape, const TopKParams ¶ms, const poplar::DebugContext &debugContext={}) |
Create an return a new tensor laid out optimally to be used as an input to a topK operation with the given parameters. More... | |
poplar::Tensor | popops::topK (poplar::Graph &graph, poplar::program::Sequence &prog, const poplar::Tensor &t, const TopKParams ¶ms, const poplar::DebugContext &debugContext={}) |
Return the top k values in the innermost dimension of a tensor. More... | |
std::pair< poplar::Tensor, poplar::Tensor > | popops::topKKeyValue (poplar::Graph &graph, poplar::program::Sequence &prog, const poplar::Tensor &keys, const poplar::Tensor &values, const TopKParams ¶ms, const poplar::DebugContext &debugContext={}) |
Return the top k values in the innermost dimension of a tensor along with the permutation of another tensor with respect to the values. More... | |
std::pair< poplar::Tensor, poplar::Tensor > | popops::topKWithPermutation (poplar::Graph &graph, poplar::program::Sequence &prog, const poplar::Tensor &t, const TopKParams ¶ms, const poplar::DebugContext &debugContext={}) |
Return the top k values in the innermost dimension of a tensor along with the indices of those values in the input tensor in the innermost dimension. More... | |
Functions for finding the top k elements.