blob: 4fe6c79ae894e96bed10d93830b902f511b8968d [file] [log] [blame]
Georgios Pinitas37831162018-08-20 15:41:10 +01001/*
2 * Copyright (c) 2018 ARM Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24//FIXME / INTERNAL_ONLY: This file should not be released!
25#ifndef __ARM_COMPUTE_DRAGONBENCH_CONFIGS_H__
26#define __ARM_COMPUTE_DRAGONBENCH_CONFIGS_H__
27
28#include <string>
29#include <vector>
30
Georgios Pinitas9593bde2018-10-25 19:17:35 +010031#include "dragonbench/conv2d/conv2d.hpp"
32#include "dragonbench/fully_connected/fully_connected.hpp"
Georgios Pinitas37831162018-08-20 15:41:10 +010033
34namespace arm_compute
35{
Georgios Pinitas9593bde2018-10-25 19:17:35 +010036// Stream operators
37inline ::std::ostream &operator<<(::std::ostream &os, const Conv2D &conv2d_config)
38{
39 os << "network_name=" << conv2d_config.network_name << ":";
40 os << "layer_name=" << conv2d_config.layer_name << ":";
41 os << "id=" << conv2d_config.id << ":";
42 os << "Input_NCHW="
43 << conv2d_config.ibatch << ','
44 << conv2d_config.ch_in << ','
45 << conv2d_config.dim_in_h << ','
46 << conv2d_config.dim_in_w << ":";
47 os << "Output_NCHW="
48 << conv2d_config.ibatch << ','
49 << conv2d_config.ch_out << ','
50 << conv2d_config.dim_out_h << ','
51 << conv2d_config.dim_out_w << ":";
52 os << "Weights_HW="
53 << conv2d_config.kern_h << ','
54 << conv2d_config.kern_w << ":";
55 os << "Stride_HW="
56 << conv2d_config.stride_h << ','
57 << conv2d_config.stride_w << ":";
58 os << "Padding=" << conv2d_config.padding << ":";
59 return os;
60}
61inline std::string to_string(const Conv2D &conv2d_config)
62{
63 std::stringstream str;
64 str << conv2d_config;
65 return str.str();
66}
67inline ::std::ostream &operator<<(::std::ostream &os, const Fully_Connected &fc_config)
68{
69 os << "network_name=" << fc_config.network_name << ":";
70 os << "layer_name=" << fc_config.layer_name << ":";
71 os << "id=" << fc_config.id << ":";
72 os << "M=" << fc_config.m << ":";
73 os << "N=" << fc_config.n << ":";
74 os << "K=" << fc_config.k << ":";
75 return os;
76}
77inline std::string to_string(const Fully_Connected &fc_config)
78{
79 std::stringstream str;
80 str << fc_config;
81 return str.str();
82}
83
Georgios Pinitas37831162018-08-20 15:41:10 +010084namespace test
85{
86namespace benchmark
87{
88// Conv 2D benchmarks
89extern conv2d_configs silverwing_cfgs;
90extern conv2d_configs sunfyre_cfgs;
91extern conv2d_configs syrax_cfgs;
Georgios Pinitas9593bde2018-10-25 19:17:35 +010092
93// Fully Connected benchmarks
94extern fully_connected_configs dreamfyre_cfgs;
Georgios Pinitas37831162018-08-20 15:41:10 +010095} // namespace benchmark
96} // namespace test
97} // namespace arm_compute
98#endif /* __ARM_COMPUTE_DRAGONBENCH_CONFIGS_H__ */