This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

Kthvalue

Kthvalue#

MIOpen: Kthvalue
Kthvalue

Functions

miopenStatus_t miopenKthvalueForward (miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, const void *input, miopenTensorDescriptor_t outputDesc, void *output, miopenTensorDescriptor_t indicesDesc, size_t *indices, size_t k, int32_t dim=-1, bool keepDim=false)
 Execute a Kthvalue forward layer. More...
 

Detailed Description

Function Documentation

◆ miopenKthvalueForward()

miopenStatus_t miopenKthvalueForward ( miopenHandle_t  handle,
miopenTensorDescriptor_t  inputDesc,
const void *  input,
miopenTensorDescriptor_t  outputDesc,
void *  output,
miopenTensorDescriptor_t  indicesDesc,
size_t *  indices,
size_t  k,
int32_t  dim = -1,
bool  keepDim = false 
)

Execute a Kthvalue forward layer.

Parameters
handleMIOpen handle (input)
inputDescTensor descriptor for input tensor (input)
inputData tensor input (input)
outputDescTensor descriptor for output tensor (input)
outputData tensor output (output)
indicesData tensor indices (output)
indicesDescTensor descriptor for indices tensor (input)
kThe k-th smallest element(input)
dimThe dimension to find the kth value along (Default = -1)(input)
keepDimWhether the output tensor has dim retained or not (Default = false)(input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/develop/include/miopen/miopen.h.