2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TFLITE_VANILLA_RUN_ARGS_H__
18 #define __TFLITE_VANILLA_RUN_ARGS_H__
21 #include <boost/program_options.hpp>
23 namespace po = boost::program_options;
25 namespace TFLiteVanillaRun
31 Args(const int argc, char **argv) noexcept;
34 const std::string &getTFLiteFilename(void) const { return _tflite_filename; }
35 const std::string &getDumpFilename(void) const { return _dump_filename; }
36 const std::string &getCompareFilename(void) const { return _compare_filename; }
37 const std::string &getInputFilename(void) const { return _input_filename; }
38 const std::vector<int> &getInputShapes(void) const { return _input_shapes; }
39 const int getNumRuns(void) const { return _num_runs; }
40 const int getWarmupRuns(void) const { return _warmup_runs; }
41 const int getRunDelay(void) const { return _run_delay; }
42 const bool getGpuMemoryPoll(void) const { return _gpumem_poll; }
43 const bool getMemoryPoll(void) const { return _mem_poll; }
44 const bool getWriteReport(void) const { return _write_report; }
45 const bool getModelValidate(void) const { return _tflite_validate; }
46 const int getVerboseLevel(void) const { return _verbose_level; }
50 void Parse(const int argc, char **argv);
53 po::positional_options_description _positional;
54 po::options_description _options;
56 std::string _tflite_filename;
57 std::string _dump_filename;
58 std::string _compare_filename;
59 std::string _input_filename;
60 std::vector<int> _input_shapes;
67 bool _tflite_validate;
71 } // end of namespace TFLiteVanillaRun
73 #endif // __TFLITE_VANILLA_RUN_ARGS_H__