|
| 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" |
0 commit comments