1/*******************************************************************************
2* Copyright 2020-2022 Intel Corporation
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*******************************************************************************/
16
17#ifndef GPU_GPU_IMPL_LIST_HPP
18#define GPU_GPU_IMPL_LIST_HPP
19
20#include <map>
21#include <vector>
22
23#include "common/engine.hpp"
24#include "common/impl_list_item.hpp"
25#include "common/impl_registration.hpp"
26
27namespace dnnl {
28namespace impl {
29namespace gpu {
30
31#define INSTANCE(...) \
32 impl_list_item_t( \
33 impl_list_item_t::type_deduction_helper_t<__VA_ARGS__::pd_t>()),
34
35#define DECLARE_IMPL_LIST(kind) \
36 const impl_list_item_t *get_##kind##_impl_list(const kind##_desc_t *desc);
37
38DECLARE_IMPL_LIST(batch_normalization);
39DECLARE_IMPL_LIST(binary);
40DECLARE_IMPL_LIST(convolution);
41DECLARE_IMPL_LIST(deconvolution);
42DECLARE_IMPL_LIST(eltwise);
43DECLARE_IMPL_LIST(gemm);
44DECLARE_IMPL_LIST(inner_product);
45DECLARE_IMPL_LIST(layer_normalization);
46DECLARE_IMPL_LIST(lrn);
47DECLARE_IMPL_LIST(matmul);
48DECLARE_IMPL_LIST(pooling);
49DECLARE_IMPL_LIST(prelu);
50DECLARE_IMPL_LIST(reduction);
51DECLARE_IMPL_LIST(resampling);
52DECLARE_IMPL_LIST(rnn);
53DECLARE_IMPL_LIST(shuffle);
54DECLARE_IMPL_LIST(softmax);
55DECLARE_IMPL_LIST(zero_pad);
56
57#undef DECLARE_IMPL_LIST
58
59class gpu_impl_list_t {
60public:
61 static const impl_list_item_t *get_concat_implementation_list();
62 static const impl_list_item_t *get_reorder_implementation_list(
63 const memory_desc_t *src_md, const memory_desc_t *dst_md);
64 static const impl_list_item_t *get_sum_implementation_list();
65 static const impl_list_item_t *get_implementation_list(
66 const op_desc_t *desc);
67};
68
69} // namespace gpu
70} // namespace impl
71} // namespace dnnl
72
73#endif // GPU_GPU_IMPL_LIST_HPP
74