Georgios Pinitas | 3783116 | 2018-08-20 15:41:10 +0100 | [diff] [blame] | 1 | /* |
| 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 Pinitas | 9593bde | 2018-10-25 19:17:35 +0100 | [diff] [blame] | 31 | #include "dragonbench/conv2d/conv2d.hpp" |
| 32 | #include "dragonbench/fully_connected/fully_connected.hpp" |
Georgios Pinitas | 3783116 | 2018-08-20 15:41:10 +0100 | [diff] [blame] | 33 | |
| 34 | namespace arm_compute |
| 35 | { |
Georgios Pinitas | 9593bde | 2018-10-25 19:17:35 +0100 | [diff] [blame] | 36 | // Stream operators |
| 37 | inline ::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 | } |
| 61 | inline std::string to_string(const Conv2D &conv2d_config) |
| 62 | { |
| 63 | std::stringstream str; |
| 64 | str << conv2d_config; |
| 65 | return str.str(); |
| 66 | } |
| 67 | inline ::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 | } |
| 77 | inline 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 Pinitas | 3783116 | 2018-08-20 15:41:10 +0100 | [diff] [blame] | 84 | namespace test |
| 85 | { |
| 86 | namespace benchmark |
| 87 | { |
| 88 | // Conv 2D benchmarks |
| 89 | extern conv2d_configs silverwing_cfgs; |
| 90 | extern conv2d_configs sunfyre_cfgs; |
| 91 | extern conv2d_configs syrax_cfgs; |
Georgios Pinitas | 9593bde | 2018-10-25 19:17:35 +0100 | [diff] [blame] | 92 | |
| 93 | // Fully Connected benchmarks |
| 94 | extern fully_connected_configs dreamfyre_cfgs; |
Georgios Pinitas | 3783116 | 2018-08-20 15:41:10 +0100 | [diff] [blame] | 95 | } // namespace benchmark |
| 96 | } // namespace test |
| 97 | } // namespace arm_compute |
| 98 | #endif /* __ARM_COMPUTE_DRAGONBENCH_CONFIGS_H__ */ |