Add CLTuner support
Added CLTuner support.
For CLTuner support, this patch adds a new internal API, SetCLTuner function.
This function passes user-given CLTuner configuration to MLAPI and ARMNN
backends before inference engine loads a given model file.
[How to use]
There are two CLTuner modes:
READ : inference engine refers to a given tuned file for inference.
GENERATION : inference engine generates a tuning file to a given model file.
And there are three CLTuner types:
EXHAUSTIVE : The tuning speed is slow but aggressive optimization.
NORMAL : The tuning speed is reasonable and reasonable optimization.
RAPID : The tuning speed is fast but leient optimization.
- For CLTuner read mode,
inference_engine_cltuner cltuner = {
.active = true,
.update = false,
.cltuner.type = INFERENCE_ENGINE_CLTUNER_READ,
};
- For CLTuner generation mode,
inference_engine_cltuner cltuner = {
.active = true,
.update = true,
.cltuner.type = INFERENCE_ENGINE_CLTUNER_{EXHAUSTIVE |
NORMAL |
RAPID},
};
inference_engine_capacity capacity;
engine->GetBackendCapacity(&capacity);
if (capacity.cltuner_supported)
engine->SetCLTuner(&cltuner);
Change-Id: Id1cc9513e444dfad21b933b46535c1b810f4a4d6
Signed-off-by: Inki Dae <inki.dae@samsung.com>