ArmNN
 25.11
Loading...
Searching...
No Matches
ArmComputeTuningUtils.cpp
Go to the documentation of this file.
1//
2// Copyright © 2023 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
7
8namespace armnn
9{
10
16
22
24{
25 delete params;
26}
27
35
36void ClTunedParameters::Load(const char* filename)
37{
38 try
39 {
40 m_Tuner.load_from_file(filename);
41 }
42 catch (const std::exception& e)
43 {
44 throw Exception(std::string("Failed to load tuned parameters file '") + filename + "': " + e.what());
45 }
46}
47
48void ClTunedParameters::Save(const char* filename) const
49{
50 try
51 {
52 m_Tuner.save_to_file(filename);
53 }
54 catch (const std::exception& e)
55 {
56 throw Exception(std::string("Failed to save tuned parameters file to '") + filename + "': " + e.what());
57 }
58}
59
60}
virtual void Load(const char *filename)
Loads an existing set of tuned parameters from the given file.
virtual void Save(const char *filename) const
Saves the current set of tuned parameters to the given file.
ClTunedParameters(IGpuAccTunedParameters::Mode mode, IGpuAccTunedParameters::TuningLevel tuningLevel)
Base class for all ArmNN exceptions so that users can filter to just those.
Manages a set of GpuAcc parameters which have been tuned for maximum performance.
Definition IRuntime.hpp:282
static void Destroy(IGpuAccTunedParameters *params)
static IGpuAccTunedParametersPtr Create(Mode mode, TuningLevel tunerMode)
static IGpuAccTunedParameters * CreateRaw(Mode mode, TuningLevel tunerMode)
Creates an IClTunedParameters with the given mode.
Copyright (c) 2021 ARM Limited and Contributors.
std::shared_ptr< IGpuAccTunedParameters > IGpuAccTunedParametersPtr
The following API is replaced by the backend options API.
Definition IRuntime.hpp:268