2 // Copyright (c) 2017 Intel Corporation
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.
18 #include "program_node.h"
23 inline std::string bool_to_str(const bool condi)
32 inline std::string get_extr_type(const char* str)
39 while (*str && *str != '<')
49 while (*end && *end != '>')
58 return{ str + 1, end };
61 inline std::string dt_to_str(data_types dt)
65 case data_types::i8: return "i8";
66 case data_types::f16: return "f16";
67 case data_types::f32: return "f32";
69 return "unknown (" + std::to_string(std::underlying_type_t<data_types>(dt)) + ")";
73 inline std::string fmt_to_str(format fmt)
77 case format::bfyx: return "bfyx";
78 case format::byxf: return "byxf";
79 case format::yxfb: return "yxfb";
80 case format::fyxb: return "fyxb";
81 case format::bs_x_bsv16: return "bs_x_bsv16";
82 case format::bs_xs_xsv8_bsv8: return "bs_xs_xsv8_bsv8";
83 case format::bs_xs_xsv8_bsv16: return "bs_xs_xsv8_bsv16";
84 case format::os_iyx_osv16: return "os_iyx_osv16";
85 case format::os_is_yx_isa8_osv8_isv4: return "os_is_yx_isa8_osv8_isv4";
86 case format::byxf_af32: return "byxf_af32";
88 return "unknown (" + std::to_string(fmt.value) + ")";