Poplar and PopLibs
popops::TopKParams Struct Reference

Parameters for topK* APIs. More...

#include <TopK.hpp>

Public Attributes

unsigned k
 The number of outputs from the top k operation. More...
 
bool largest
 If true, return the top k largest elements. More...
 
SortOrder sortOrder
 The required ordering of elements in the resulting tensor.
 
bool stableSort
 When sortOrder != SortOrder::NONE and stableSort is true, the relative order of values that compare equal are guaranteed not to change in the output.
 

Detailed Description

Parameters for topK* APIs.

Member Data Documentation

◆ k

unsigned popops::TopKParams::k

The number of outputs from the top k operation.

This must be less or equal the number of elements in the innermost dimension of the tensor used as input to the operation.

◆ largest

bool popops::TopKParams::largest

If true, return the top k largest elements.

Otherwise return the top k smallest elements.


The documentation for this struct was generated from the following file: