MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / configure

Method configure

src/core/CPP/kernels/CPPTopKVKernel.cpp:105–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void 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
127Status CPPTopKVKernel::validate(const ITensorInfo *predictions,
128 const ITensorInfo *targets,

Callers

nothing calls this directly

Calls 5

auto_init_if_emptyFunction · 0.85
validate_argumentsFunction · 0.70
WindowClass · 0.50
infoMethod · 0.45
dimensionMethod · 0.45

Tested by

no test coverage detected