Skip to content

Commit c152c4b

Browse files
authored
Fix header template linting (#39)
Make the header comply with Autoware.auto linting style. Also fix hadolint in CI. Issue-Id: SCM-1941 Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com> Change-Id: I9722005cca81acc1494c99e531fcc68d78bbf3db
1 parent 9cbde7a commit c152c4b

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

.github/workflows/docker-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
container:
15-
image: hadolint/hadolint:latest
15+
image: hadolint/hadolint:latest-debian
1616

1717
steps:
1818

scripts/tvm_cli/templates/inference_engine_tvm_config.hpp.jinja2

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
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

925
tvm_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

Comments
 (0)