|
4 | 4 |
|
5 | 5 | #include "primitive_base.hpp"
|
6 | 6 |
|
| 7 | +#include "resample.hpp" |
7 | 8 | #include "resample_inst.h"
|
8 | 9 | #include "kernel_selector/kernels/resample/resample_kernel_selector.h"
|
9 | 10 | #include "kernel_selector/kernels/resample/resample_kernel_base.h"
|
@@ -174,42 +175,47 @@ struct resample_impl : typed_primitive_impl_ocl<resample> {
|
174 | 175 | }
|
175 | 176 | };
|
176 | 177 |
|
177 |
| -namespace detail { |
178 |
| - |
179 |
| -attach_resample_impl::attach_resample_impl() { |
180 |
| - std::set<implementation_map<resample>::key_type> keys; |
181 |
| - |
182 |
| - const auto types = {data_types::f16, data_types::f32, data_types::i8, data_types::u8, data_types::i32}; |
183 |
| - const auto formats = { |
184 |
| - format::bfyx, |
185 |
| - format::b_fs_yx_fsv16, |
186 |
| - format::b_fs_yx_fsv32, |
187 |
| - format::bs_fs_yx_bsv16_fsv16, |
188 |
| - format::bs_fs_yx_bsv32_fsv16, |
189 |
| - format::bs_fs_yx_bsv32_fsv32, |
190 |
| - |
191 |
| - format::bfzyx, |
192 |
| - format::b_fs_zyx_fsv16, |
193 |
| - format::b_fs_zyx_fsv32, |
194 |
| - format::bs_fs_zyx_bsv16_fsv32, |
195 |
| - format::bs_fs_zyx_bsv16_fsv16, |
196 |
| - format::bs_fs_zyx_bsv32_fsv32, |
197 |
| - format::bs_fs_zyx_bsv32_fsv16, |
198 |
| - }; |
199 |
| - for (const auto type : types) { |
200 |
| - for (const auto format : formats) { |
201 |
| - keys.emplace(type, format); |
202 |
| - } |
203 |
| - } |
204 |
| - |
205 |
| - keys.emplace(data_types::f32, format::yxfb); |
206 |
| - keys.emplace(data_types::f16, format::yxfb); |
207 |
| - keys.emplace(data_types::f16, format::fs_b_yx_fsv32); |
208 |
| - |
209 |
| - implementation_map<resample>::add(impl_types::ocl, typed_primitive_impl_ocl<resample>::create<resample_impl>, keys); |
| 178 | +// namespace detail { |
| 179 | + |
| 180 | +// attach_resample_impl::attach_resample_impl() { |
| 181 | +// std::set<implementation_map<resample>::key_type> keys; |
| 182 | + |
| 183 | +// const auto types = {data_types::f16, data_types::f32, data_types::i8, data_types::u8, data_types::i32}; |
| 184 | +// const auto formats = { |
| 185 | +// format::bfyx, |
| 186 | +// format::b_fs_yx_fsv16, |
| 187 | +// format::b_fs_yx_fsv32, |
| 188 | +// format::bs_fs_yx_bsv16_fsv16, |
| 189 | +// format::bs_fs_yx_bsv32_fsv16, |
| 190 | +// format::bs_fs_yx_bsv32_fsv32, |
| 191 | + |
| 192 | +// format::bfzyx, |
| 193 | +// format::b_fs_zyx_fsv16, |
| 194 | +// format::b_fs_zyx_fsv32, |
| 195 | +// format::bs_fs_zyx_bsv16_fsv32, |
| 196 | +// format::bs_fs_zyx_bsv16_fsv16, |
| 197 | +// format::bs_fs_zyx_bsv32_fsv32, |
| 198 | +// format::bs_fs_zyx_bsv32_fsv16, |
| 199 | +// }; |
| 200 | +// for (const auto type : types) { |
| 201 | +// for (const auto format : formats) { |
| 202 | +// keys.emplace(type, format); |
| 203 | +// } |
| 204 | +// } |
| 205 | + |
| 206 | +// keys.emplace(data_types::f32, format::yxfb); |
| 207 | +// keys.emplace(data_types::f16, format::yxfb); |
| 208 | +// keys.emplace(data_types::f16, format::fs_b_yx_fsv32); |
| 209 | + |
| 210 | +// implementation_map<resample>::add(impl_types::ocl, typed_primitive_impl_ocl<resample>::create<resample_impl>, keys); |
| 211 | +// } |
| 212 | + |
| 213 | +// } // namespace detail |
| 214 | +std::unique_ptr<primitive_impl> ResampleImplementationManager::create_impl(const program_node& node, const kernel_impl_params& params) const { |
| 215 | + assert(node.is_type<resample>()); |
| 216 | + return typed_primitive_impl_ocl<resample>::create<resample_impl>(static_cast<const resample_node&>(node), params); |
210 | 217 | }
|
211 | 218 |
|
212 |
| -} // namespace detail |
213 | 219 | } // namespace ocl
|
214 | 220 | } // namespace cldnn
|
215 | 221 |
|
|
0 commit comments