1 /*******************************************************************************
2 * Copyright 2017-2018 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.
15 *******************************************************************************/
19 #include "cpu_engine.hpp"
20 #include "cpu_memory.hpp"
21 #include "type_helpers.hpp"
23 #include "cpu/cpu_concat.hpp"
24 #include "cpu/ref_concat.hpp"
25 #include "cpu/simple_concat.hpp"
31 using cpd_create_f = mkldnn::impl::engine_t::concat_primitive_desc_create_f;
34 #define INSTANCE(...) __VA_ARGS__::pd_t::create
35 static const cpd_create_f cpu_concat_impl_list[] = {
36 INSTANCE(simple_concat_t<data_type::f32>),
37 INSTANCE(simple_concat_t<data_type::u8>),
38 #ifdef ENABLE_UNUSED_PRIM
39 INSTANCE(simple_concat_t<data_type::s8>),
41 INSTANCE(simple_concat_t<data_type::s32>),
42 #ifdef ENABLE_UNUSED_PRIM
43 INSTANCE(simple_concat_t<data_type::bf16>),
45 INSTANCE(ref_concat_t),
51 const cpd_create_f *cpu_engine_t::get_concat_implementation_list() const {
52 return cpu_concat_impl_list;