11{% - set namespace = ["model_zoo" ] + namespace .split ('/' ) -%}
2+ // Copyright 2021 Arm Limited and Contributors.
3+ //
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
7+ //
8+ // http://www.apache.org/licenses/LICENSE-2.0
9+ //
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.
15+
216#include "tvm_utility/pipeline{{ header_extension }}"
317
4- #pragma once
18+ #ifndef INFERENCE_ENGINE_TVM_CONFIG_HPP_ // NOLINT
19+ #define INFERENCE_ENGINE_TVM_CONFIG_HPP_
520{% for ns in namespace %}
6- namespace {{ ns }} {
21+ namespace {{ ns }}
22+ {
723{% - endfor %}
824
925tvm_utility::pipeline::InferenceEngineTVMConfig config {
@@ -20,16 +36,17 @@ tvm_utility::pipeline::InferenceEngineTVMConfig config {
2036
2137 .network_inputs = {
2238 {% - for node in input_list %}
23- { "{{ node['name'] }}", { {{ node['shape'] |join(', ') }} } }{{ ',' if not loop.last }}
39+ {"{{ node['name'] }}", {{ '{' }}{{ node['shape'] |join(', ') }}{{ '}}' } }{{ ',' if not loop.last }}
2440 {% - endfor %}
2541 },
2642
2743 .network_outputs = {
2844 {% - for node in output_list %}
29- { "{{ node['name'] }}", { {{ node['shape'] |join(', ') }} } }{{ ',' if not loop.last }}
45+ {"{{ node['name'] }}", {{ '{' }}{{ node['shape'] |join(', ') }}{{ '}}' } }{{ ',' if not loop.last }}
3046 {% - endfor %}
3147 }
3248};
3349{% for ns in namespace |reverse %}
34- } // namespace {{ ns }}
50+ } // namespace {{ ns }}
3551{% - endfor %}
52+ #endif // INFERENCE_ENGINE_TVM_CONFIG_HPP_ // NOLINT
0 commit comments