Skip to content

Commit 295fe33

Browse files
committed
[UnitTest]update onnx ops 1.5.0->1.8.0
1 parent fd0eedb commit 295fe33

File tree

1,846 files changed

+55933
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,846 files changed

+55933
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//===-test_adagrad_dnnl.cc-----------------------------------------------------------===//
2+
//
3+
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// =============================================================================
17+
18+
// clang-format off
19+
// Testing CXX Code Gen using ODLA API on dnnl
20+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad/test_data_set_0/input_0.cc -x onnx -emit-data-as-c %data_path/test_adagrad/test_data_set_0/input_0.pb
21+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad/test_data_set_0/input_1.cc -x onnx -emit-data-as-c %data_path/test_adagrad/test_data_set_0/input_1.pb
22+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad/test_data_set_0/output_0.cc -x onnx -emit-data-as-c %data_path/test_adagrad/test_data_set_0/output_0.pb
23+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad/test_data_set_0/output_1.cc -x onnx -emit-data-as-c %data_path/test_adagrad/test_data_set_0/output_1.pb
24+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad/test_data_set_0/input_2.cc -x onnx -emit-data-as-c %data_path/test_adagrad/test_data_set_0/input_2.pb
25+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad/test_data_set_0/input_3.cc -x onnx -emit-data-as-c %data_path/test_adagrad/test_data_set_0/input_3.pb
26+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad/test_data_set_0/input_4.cc -x onnx -emit-data-as-c %data_path/test_adagrad/test_data_set_0/input_4.pb
27+
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_adagrad/model.onnx -o %t.cc
28+
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
29+
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_adagrad/test_data_set_0 %odla_link %device_link -lodla_dnnl -o %t_dnnl.exe -Wno-deprecated-declarations
30+
// RUN: %t_dnnl.exe 0.0001 0 dnnl %data_path/test_adagrad | FileCheck %s
31+
// CHECK: Result Pass
32+
// clang-format on
33+
// XFAIL: *
34+
#include "test_adagrad_dnnl.cc.tmp.main.cc.in"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//===-test_adagrad_multiple_dnnl.cc-----------------------------------------------------------===//
2+
//
3+
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// =============================================================================
17+
18+
// clang-format off
19+
// Testing CXX Code Gen using ODLA API on dnnl
20+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_0.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_0.pb
21+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_1.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_1.pb
22+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_2.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_2.pb
23+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/output_0.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/output_0.pb
24+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/output_1.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/output_1.pb
25+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/output_2.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/output_2.pb
26+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_3.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_3.pb
27+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/output_3.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/output_3.pb
28+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_4.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_4.pb
29+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_5.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_5.pb
30+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_6.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_6.pb
31+
// RUN: %halo_compiler -target cxx -o %data_path/test_adagrad_multiple/test_data_set_0/input_7.cc -x onnx -emit-data-as-c %data_path/test_adagrad_multiple/test_data_set_0/input_7.pb
32+
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_adagrad_multiple/model.onnx -o %t.cc
33+
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
34+
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_adagrad_multiple/test_data_set_0 %odla_link %device_link -lodla_dnnl -o %t_dnnl.exe -Wno-deprecated-declarations
35+
// RUN: %t_dnnl.exe 0.0001 0 dnnl %data_path/test_adagrad_multiple | FileCheck %s
36+
// CHECK: Result Pass
37+
// clang-format on
38+
// XFAIL: *
39+
#include "test_adagrad_multiple_dnnl.cc.tmp.main.cc.in"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//===-test_adam_dnnl.cc-----------------------------------------------------------===//
2+
//
3+
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// =============================================================================
17+
18+
// clang-format off
19+
// Testing CXX Code Gen using ODLA API on dnnl
20+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/input_0.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/input_0.pb
21+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/input_1.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/input_1.pb
22+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/output_0.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/output_0.pb
23+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/output_1.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/output_1.pb
24+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/output_2.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/output_2.pb
25+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/input_2.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/input_2.pb
26+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/input_3.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/input_3.pb
27+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/input_4.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/input_4.pb
28+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam/test_data_set_0/input_5.cc -x onnx -emit-data-as-c %data_path/test_adam/test_data_set_0/input_5.pb
29+
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_adam/model.onnx -o %t.cc
30+
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
31+
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_adam/test_data_set_0 %odla_link %device_link -lodla_dnnl -o %t_dnnl.exe -Wno-deprecated-declarations
32+
// RUN: %t_dnnl.exe 0.0001 0 dnnl %data_path/test_adam | FileCheck %s
33+
// CHECK: Result Pass
34+
// clang-format on
35+
// XFAIL: *
36+
#include "test_adam_dnnl.cc.tmp.main.cc.in"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//===-test_adam_multiple_dnnl.cc-----------------------------------------------------------===//
2+
//
3+
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// =============================================================================
17+
18+
// clang-format off
19+
// Testing CXX Code Gen using ODLA API on dnnl
20+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_0.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_0.pb
21+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_1.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_1.pb
22+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_2.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_2.pb
23+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/output_0.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/output_0.pb
24+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/output_1.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/output_1.pb
25+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_3.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_3.pb
26+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/output_2.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/output_2.pb
27+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/output_3.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/output_3.pb
28+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_4.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_4.pb
29+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/output_4.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/output_4.pb
30+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_5.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_5.pb
31+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_6.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_6.pb
32+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_7.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_7.pb
33+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_8.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_8.pb
34+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/input_9.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/input_9.pb
35+
// RUN: %halo_compiler -target cxx -o %data_path/test_adam_multiple/test_data_set_0/output_5.cc -x onnx -emit-data-as-c %data_path/test_adam_multiple/test_data_set_0/output_5.pb
36+
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_adam_multiple/model.onnx -o %t.cc
37+
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
38+
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_adam_multiple/test_data_set_0 %odla_link %device_link -lodla_dnnl -o %t_dnnl.exe -Wno-deprecated-declarations
39+
// RUN: %t_dnnl.exe 0.0001 0 dnnl %data_path/test_adam_multiple | FileCheck %s
40+
// CHECK: Result Pass
41+
// clang-format on
42+
// XFAIL: *
43+
#include "test_adam_multiple_dnnl.cc.tmp.main.cc.in"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//===-test_argmax_default_axis_example_select_last_index_dnnl.cc-----------------------------------------------------------===//
2+
//
3+
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// =============================================================================
17+
18+
// clang-format off
19+
// Testing CXX Code Gen using ODLA API on dnnl
20+
// RUN: %halo_compiler -target cxx -o %data_path/test_argmax_default_axis_example_select_last_index/test_data_set_0/output_0.cc -x onnx -emit-data-as-c %data_path/test_argmax_default_axis_example_select_last_index/test_data_set_0/output_0.pb
21+
// RUN: %halo_compiler -target cxx -o %data_path/test_argmax_default_axis_example_select_last_index/test_data_set_0/input_0.cc -x onnx -emit-data-as-c %data_path/test_argmax_default_axis_example_select_last_index/test_data_set_0/input_0.pb
22+
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_argmax_default_axis_example_select_last_index/model.onnx -o %t.cc
23+
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
24+
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_argmax_default_axis_example_select_last_index/test_data_set_0 %odla_link %device_link -lodla_dnnl -o %t_dnnl.exe -Wno-deprecated-declarations
25+
// RUN: %t_dnnl.exe 0.0001 0 dnnl %data_path/test_argmax_default_axis_example_select_last_index | FileCheck %s
26+
// CHECK: Result Pass
27+
// clang-format on
28+
// XFAIL: *
29+
#include "test_argmax_default_axis_example_select_last_index_dnnl.cc.tmp.main.cc.in"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//===-test_argmax_default_axis_random_select_last_index_dnnl.cc-----------------------------------------------------------===//
2+
//
3+
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// =============================================================================
17+
18+
// clang-format off
19+
// Testing CXX Code Gen using ODLA API on dnnl
20+
// RUN: %halo_compiler -target cxx -o %data_path/test_argmax_default_axis_random_select_last_index/test_data_set_0/output_0.cc -x onnx -emit-data-as-c %data_path/test_argmax_default_axis_random_select_last_index/test_data_set_0/output_0.pb
21+
// RUN: %halo_compiler -target cxx -o %data_path/test_argmax_default_axis_random_select_last_index/test_data_set_0/input_0.cc -x onnx -emit-data-as-c %data_path/test_argmax_default_axis_random_select_last_index/test_data_set_0/input_0.pb
22+
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_argmax_default_axis_random_select_last_index/model.onnx -o %t.cc
23+
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
24+
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_argmax_default_axis_random_select_last_index/test_data_set_0 %odla_link %device_link -lodla_dnnl -o %t_dnnl.exe -Wno-deprecated-declarations
25+
// RUN: %t_dnnl.exe 0.0001 0 dnnl %data_path/test_argmax_default_axis_random_select_last_index | FileCheck %s
26+
// CHECK: Result Pass
27+
// clang-format on
28+
// XFAIL: *
29+
#include "test_argmax_default_axis_random_select_last_index_dnnl.cc.tmp.main.cc.in"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//===-test_argmax_keepdims_example_select_last_index_dnnl.cc-----------------------------------------------------------===//
2+
//
3+
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// =============================================================================
17+
18+
// clang-format off
19+
// Testing CXX Code Gen using ODLA API on dnnl
20+
// RUN: %halo_compiler -target cxx -o %data_path/test_argmax_keepdims_example_select_last_index/test_data_set_0/output_0.cc -x onnx -emit-data-as-c %data_path/test_argmax_keepdims_example_select_last_index/test_data_set_0/output_0.pb
21+
// RUN: %halo_compiler -target cxx -o %data_path/test_argmax_keepdims_example_select_last_index/test_data_set_0/input_0.cc -x onnx -emit-data-as-c %data_path/test_argmax_keepdims_example_select_last_index/test_data_set_0/input_0.pb
22+
// RUN: %halo_compiler -target cxx -batch-size 1 %halo_compile_flags %data_path/test_argmax_keepdims_example_select_last_index/model.onnx -o %t.cc
23+
// RUN: %cxx -c -fPIC -o %t.o %t.cc -I%odla_path/include
24+
// RUN: %cxx -g %s %t.o %t.bin -I%T -I%odla_path/include -I%unittests_path -I%data_path/test_argmax_keepdims_example_select_last_index/test_data_set_0 %odla_link %device_link -lodla_dnnl -o %t_dnnl.exe -Wno-deprecated-declarations
25+
// RUN: %t_dnnl.exe 0.0001 0 dnnl %data_path/test_argmax_keepdims_example_select_last_index | FileCheck %s
26+
// CHECK: Result Pass
27+
// clang-format on
28+
// XFAIL: *
29+
#include "test_argmax_keepdims_example_select_last_index_dnnl.cc.tmp.main.cc.in"

0 commit comments

Comments
 (0)