27 template <conv_type TT,
typename I,
typename K,
typename C>
34 if (
egblas_enabled && all_floating<I, K, C> && all_homogeneous<I, K, C> && impl::egblas::has_sconv1_valid && !no_gpu) {
40 if (
egblas_enabled && all_floating<I, K, C> && all_homogeneous<I, K, C> && impl::egblas::has_sconv1_same && !no_gpu) {
46 if (
egblas_enabled && all_floating<I, K, C> && all_homogeneous<I, K, C> && impl::egblas::has_sconv1_full && !no_gpu) {
52 if (impl::cufft::conv1_possible<I, K, C> && !no_gpu) {
54 }
else if (impl::blas::conv1_possible<I, K, C>) {
60 if (impl::vec::conv1_possible<vector_mode, I, K, C>) {
77 template <conv_type TT,
typename I,
typename K,
typename C>
93 if (impl::cudnn::conv_possible<I, K, C> && !no_gpu) {
95 }
else if (impl::cufft::conv2_possible<I, K, C> && !no_gpu) {
97 }
else if (impl::blas::conv2_possible<I, K, C>) {
102 if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
119 template <conv_type TT,
typename I,
typename K,
typename C>
135 }
else if (impl::vec::conv2_possible<vector_mode, I, K, C>) {
142 #ifdef ETL_MANUAL_SELECT 151 template <conv_type TT,
typename I,
typename K,
typename C>
153 auto default_impl = select_default_conv1_impl_new<TT, I, K, C>(
local_context().
cpu);
162 if (!impl::blas::conv1_possible<I, K, C>) {
163 std::cerr <<
"Forced selection to MKL fft_conv implementation, but not possible for this expression" << std::endl;
171 if (!impl::cufft::conv1_possible<I, K, C> ||
local_context().cpu) {
172 std::cerr <<
"Forced selection to CUFFT fft_conv implementation, but not possible for this expression" << std::endl;
180 if (!impl::vec::conv1_possible<vector_mode, I, K, C>) {
181 std::cerr <<
"Forced selection to VEC conv1 implementation, but not possible for this expression" << std::endl;
190 std::cerr <<
"Forced selection to EGBLAS conv1 implementation, but not possible for this expression" << std::endl;
213 template <conv_type TT,
typename I,
typename K,
typename C>
215 auto default_impl = select_default_conv2_impl_new<TT, I, K, C>(
local_context().
cpu);
224 if (!impl::vec::conv2_possible<vector_mode, I, K, C>) {
225 std::cerr <<
"Forced selection to VEC conv2 implementation, but not possible for this expression" << std::endl;
233 if (!impl::cudnn::conv_possible<I, K, C> ||
local_context().cpu) {
234 std::cerr <<
"Forced selection to CUDNN conv implementation, but not possible for this expression" << std::endl;
242 if (!impl::blas::conv2_possible<I, K, C>) {
243 std::cerr <<
"Forced selection to MKL conv implementation, but not possible for this expression" << std::endl;
251 if (!impl::cufft::conv2_possible<I, K, C> ||
local_context().cpu) {
252 std::cerr <<
"Forced selection to CUFFT conv implementation, but not possible for this expression" << std::endl;
275 template <conv_type TT,
typename I,
typename K,
typename C>
277 auto default_impl = select_default_conv_impl<TT, I, K, C>(
local_context().
cpu);
286 if (!impl::blas::conv2_possible<I, K, C>) {
287 std::cerr <<
"Forced selection to MKL fft_conv implementation, but not possible for this expression" << std::endl;
295 if (!impl::cufft::conv2_possible<I, K, C> ||
local_context().cpu) {
296 std::cerr <<
"Forced selection to CUFFT fft_conv implementation, but not possible for this expression" << std::endl;
304 if (!impl::cudnn::conv_possible<I, K, C> ||
local_context().cpu) {
305 std::cerr <<
"Forced selection to CUDNN conv implementation, but not possible for this expression" << std::endl;
313 if (!impl::vec::conv2_possible<vector_mode, I, K, C>) {
314 std::cerr <<
"Forced selection to VEC conv2 implementation, but not possible for this expression" << std::endl;
340 template <conv_type TT,
typename I,
typename K,
typename C>
342 return select_default_conv1_impl_new<TT, I, K, C>(
false);
353 template <conv_type TT,
typename I,
typename K,
typename C>
355 return select_default_conv2_impl_new<TT, I, K, C>(
false);
366 template <conv_type TT,
typename I,
typename K,
typename C>
368 return select_default_conv_impl<TT, I, K, C>(
false);
constexpr etl::conv_impl select_conv1_impl_new()
Select the implementation of the conv of I and K in C.
Definition: conv_normal_select.hpp:341
FFT reduction (with MKL impl)
constexpr etl::conv_impl select_default_conv2_impl_new(bool no_gpu)
Select the implementation of the conv of I and K in C.
Definition: conv_normal_select.hpp:78
order
Storage order of a matrix.
Definition: order.hpp:15
constexpr etl::conv_impl select_conv_impl()
Select the implementation of the conv of I and K in C.
Definition: conv_normal_select.hpp:367
Definition: expression_builder.hpp:699
constexpr etl::conv_impl select_conv2_impl_new()
Select the implementation of the conv of I and K in C.
Definition: conv_normal_select.hpp:354
Traits to get information about ETL types.
Definition: tmp.hpp:68
context & local_context()
Return the configuration context of the current thread.
Definition: context.hpp:50
constexpr bool egblas_enabled
Indicates if the EGBLAS library is available for ETL.
Definition: config.hpp:119
bool cpu
Force CPU evaluation.
Definition: context.hpp:29
conv_impl
Enumeration describing the different convolution implementations.
Definition: conv_impl.hpp:20
constexpr etl::conv_impl select_default_conv_impl(bool no_gpu)
Select the implementation of the conv of I and K in C.
Definition: conv_normal_select.hpp:120
constexpr etl::conv_impl select_default_conv1_impl_new(bool no_gpu)
Select the implementation of the conv of I and K in C.
Definition: conv_normal_select.hpp:28
FFT reduction (with CUFFT impl)