27 template <
typename I,
typename K,
typename C>
41 if (impl::cudnn::conv_possible<I, K, C> && !no_gpu) {
46 if (k1 == k2 && k1 <= 5) {
47 if (impl::vec::conv2_possible<vector_mode, I, K, C> && i1 == i2 && i1 > 100) {
52 }
else if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
58 if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
77 template <
typename I,
typename K,
typename C>
92 if (k1 == k2 && k1 <= 5) {
93 if (impl::vec::conv2_possible<vector_mode, I, K, C> && i1 == i2 && i1 > 100) {
98 }
else if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
104 if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
123 template <
typename I,
typename K,
typename C>
138 if (k1 == k2 && k1 <= 5) {
139 if (i1 == i2 && i1 > 100) {
140 if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
146 }
else if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
152 if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
171 template <
typename I,
typename K,
typename C>
186 if (impl::cudnn::conv_possible<I, K, C> && !no_gpu) {
191 if (impl::cufft::conv2_possible<I, K, C> && !no_gpu) {
197 if (impl::blas::conv2_possible<I, K, C>) {
198 if (impl::vec::conv2_possible<vector_mode, I, K, C> && k1 == k2 && (k2 == 3 || k2 == 5)) {
206 if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
214 #ifdef ETL_MANUAL_SELECT 223 template <
typename I,
typename K,
typename C>
232 if (!impl::vec::conv2_possible<vector_mode, I, K, C>) {
233 std::cerr <<
"Forced selection to VEC conv4 implementation, but not possible for this expression" << std::endl;
234 return select_default_conv4_valid_impl<I, K, C>(
local_context().
cpu, i1, i2, k1, k2);
242 std::cerr <<
"Forced selection to BLAS conv implementation, but not possible for this expression" << std::endl;
243 return select_default_conv4_valid_impl<I, K, C>(
local_context().
cpu, i1, i2, k1, k2);
251 std::cerr <<
"Forced selection to CUDNN conv implementation, but not possible for this expression" << std::endl;
252 return select_default_conv4_valid_impl<I, K, C>(
local_context().
cpu, i1, i2, k1, k2);
262 return select_default_conv4_valid_impl<I, K, C>(
local_context().
cpu, i1, i2, k1, k2);
272 template <
typename I,
typename K,
typename C>
281 if (!impl::vec::conv2_possible<vector_mode, I, K, C>) {
282 std::cerr <<
"Forced selection to VEC conv4_valid_filter implementation, but not possible for this expression" 284 return select_default_conv4_valid_filter_impl<I, K, C>(i1, i2, k1, k2);
292 std::cerr <<
"Forced selection to BLAS conv implementation, but not possible for this expression" << std::endl;
293 return select_default_conv4_valid_filter_impl<I, K, C>(i1, i2, k1, k2);
303 return select_default_conv4_valid_filter_impl<I, K, C>(i1, i2, k1, k2);
313 template <
typename I,
typename K,
typename C>
322 if (!impl::vec::conv2_possible<vector_mode, I, K, C>) {
323 std::cerr <<
"Forced selection to VEC conv4_valid_back implementation, but not possible for this expression" 325 return select_default_conv4_valid_back_impl<I, K, C>(i1, i2, k1, k2);
333 std::cerr <<
"Forced selection to BLAS conv implementation, but not possible for this expression" << std::endl;
334 return select_default_conv4_valid_back_impl<I, K, C>(i1, i2, k1, k2);
344 return select_default_conv4_valid_back_impl<I, K, C>(i1, i2, k1, k2);
354 template <
typename I,
typename K,
typename C>
362 if (!impl::vec::conv2_possible<vector_mode, I, K, C>) {
363 std::cerr <<
"Forced selection to VEC conv4_full implementation, but not possible for this expression" 365 return select_default_conv4_full_impl<I, K, C>(
local_context().
cpu, k1, k2);
373 std::cerr <<
"Forced selection to CUDNN conv implementation, but not possible for this expression" << std::endl;
374 return select_default_conv4_full_impl<I, K, C>(
local_context().
cpu, k1, k2);
382 std::cerr <<
"Forced selection to FFT_CUFFT conv implementation, but not possible for this expression" 384 return select_default_conv4_full_impl<I, K, C>(
local_context().
cpu, k1, k2);
391 if (!impl::blas::conv2_possible<I, K, C>) {
392 std::cerr <<
"Forced selection to FFT_MKL conv implementation, but not possible for this expression" << std::endl;
393 return select_default_conv4_full_impl<I, K, C>(
local_context().
cpu, k1, k2);
403 return select_default_conv4_full_impl<I, K, C>(
local_context().
cpu, k1, k2);
418 template <
typename I,
typename K,
typename C>
420 return select_default_conv4_valid_impl<I, K, C>(
false, i1, i2, k1, k2);
433 template <
typename I,
typename K,
typename C>
435 return select_default_conv4_valid_filter_impl<I, K, C>(i1, i2, k1, k2);
448 template <
typename I,
typename K,
typename C>
450 return select_default_conv4_valid_back_impl<I, K, C>(i1, i2, k1, k2);
463 template <
typename I,
typename K,
typename C>
465 return select_default_conv4_full_impl<I, K, C>(
false, k1, k2);
FFT reduction (with MKL impl)
order
Storage order of a matrix.
Definition: order.hpp:15
constexpr etl::conv4_impl select_default_conv4_full_impl(bool no_gpu, size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:172
constexpr etl::conv4_impl select_conv4_valid_impl(size_t i1, size_t i2, size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:419
Definition: expression_builder.hpp:699
constexpr etl::conv4_impl select_conv4_valid_back_impl(size_t i1, size_t i2, size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:449
Traits to get information about ETL types.
Definition: tmp.hpp:68
constexpr etl::conv4_impl select_conv4_valid_filter_impl(size_t i1, size_t i2, size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:434
context & local_context()
Return the configuration context of the current thread.
Definition: context.hpp:50
FFT reduction (with STD impl)
bool cpu
Force CPU evaluation.
Definition: context.hpp:29
constexpr etl::conv4_impl select_conv4_full_impl(size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:464
constexpr bool cblas_enabled
Indicates if a BLAS library is available for ETL.
Definition: config.hpp:76
constexpr etl::conv4_impl select_default_conv4_valid_filter_impl(size_t i1, size_t i2, size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:78
constexpr etl::conv4_impl select_default_conv4_valid_impl(bool no_gpu, size_t i1, size_t i2, size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:28
constexpr etl::conv4_impl select_default_conv4_valid_back_impl(size_t i1, size_t i2, size_t k1, size_t k2)
Select the implementation of the 4D conv of I and K in C.
Definition: conv_4d_select.hpp:124
conv4_impl
Enumeration describing the different convolution implementations.
Definition: conv_impl.hpp:33
FFT reduction (with CUFFT impl)