| 103 | } |
| 104 | |
| 105 | void CPPTopKVKernel::configure(const ITensor *predictions, |
| 106 | const ITensor *targets, |
| 107 | ITensor *output, |
| 108 | const unsigned int k) |
| 109 | { |
| 110 | ARM_COMPUTE_ERROR_ON_NULLPTR(predictions, targets, output); |
| 111 | |
| 112 | // Perform validation step |
| 113 | ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(predictions->info(), targets->info(), output->info(), k)); |
| 114 | auto_init_if_empty(*output->info(), targets->info()->tensor_shape(), 1, DataType::U8); |
| 115 | |
| 116 | _predictions = predictions; |
| 117 | _targets = targets; |
| 118 | _output = output; |
| 119 | |
| 120 | _k = k; |
| 121 | _batch_size = predictions->info()->dimension(1); |
| 122 | _num_classes = predictions->info()->dimension(0); |
| 123 | |
| 124 | ICPPKernel::configure(Window()); // Default 1 iteration window |
| 125 | } |
| 126 | |
| 127 | Status CPPTopKVKernel::validate(const ITensorInfo *predictions, |
| 128 | const ITensorInfo *targets, |
nothing calls this directly
no test coverage detected