Expression Templates Library (ETL)
threshold.hpp
Go to the documentation of this file.
1 //=======================================================================
2 // Copyright (c) 2014-2023 Baptiste Wicht
3 // Distributed under the terms of the MIT License.
4 // (See accompanying file LICENSE or copy at
5 // http://opensource.org/licenses/MIT)
6 //=======================================================================
7 
14 #pragma once
15 
16 namespace etl {
17 
18 #ifdef ETL_DEBUG_THRESHOLDS
19 
20 constexpr size_t gemm_std_max = 75 * 75;
21 constexpr size_t gemm_cublas_min = 180 * 180;
22 
23 constexpr size_t gemm_rr_small_threshold = 1000;
24 constexpr size_t gemm_rr_medium_threshold = 2000;
25 constexpr size_t gemm_nt_rr_small_threshold = 1000;
26 constexpr size_t gemm_cc_small_threshold = 1000;
27 
28 constexpr size_t gevm_rm_small_threshold = 1000;
29 constexpr size_t gevm_cm_small_threshold = 1000;
30 
31 constexpr size_t gemv_rm_small_threshold = 1000;
32 constexpr size_t gemv_cm_small_threshold = 1000;
33 
34 constexpr size_t parallel_threshold = 2 * 1024;
35 
36 constexpr size_t sum_parallel_threshold = 1024 * 2;
37 constexpr size_t vec_sum_parallel_threshold = 1024 * 2;
38 
39 constexpr size_t conv1_parallel_threshold_conv = 100;
40 constexpr size_t conv1_parallel_threshold_kernel = 16;
41 
42 constexpr size_t fft1_many_threshold_transforms = 16;
43 constexpr size_t fft1_many_threshold_n = 768;
44 
45 constexpr size_t fft2_many_threshold_transforms = 16;
46 constexpr size_t fft2_many_threshold_n = 1024;
47 
48 constexpr size_t stream_threshold = 1024;
49 
50 #else
51 
52 constexpr size_t gemm_std_max = 75 * 75;
53 constexpr size_t gemm_cublas_min = 180 * 180;
54 
55 constexpr size_t gemm_rr_small_threshold = 100 * 100;
56 constexpr size_t gemm_rr_medium_threshold = 400 * 400;
57 constexpr size_t gemm_nt_rr_small_threshold = 500 * 500;
58 constexpr size_t gemm_cc_small_threshold = 40000;
59 
60 constexpr size_t gevm_rm_small_threshold = 72000;
61 constexpr size_t gevm_cm_small_threshold = 4000000;
62 
63 constexpr size_t gemv_rm_small_threshold = 4500000;
64 constexpr size_t gemv_cm_small_threshold = 2400000;
65 
66 constexpr size_t parallel_threshold = 64 * 1024;
67 
68 constexpr size_t sum_parallel_threshold = 1024 * 32;
69 constexpr size_t vec_sum_parallel_threshold = 1024 * 128;
70 
71 constexpr size_t conv1_parallel_threshold_conv = 100;
72 constexpr size_t conv1_parallel_threshold_kernel = 16;
73 
74 constexpr size_t fft1_many_threshold_transforms = 16;
75 constexpr size_t fft1_many_threshold_n = 768;
76 
77 constexpr size_t fft2_many_threshold_transforms = 16;
78 constexpr size_t fft2_many_threshold_n = 1024;
79 
80 constexpr size_t stream_threshold = cache_size;
81 
82 #endif
83 
84 } //end of namespace etl
constexpr size_t gemm_cublas_min
The minimum number or elements before considering cublas.
Definition: threshold.hpp:53
constexpr size_t gemv_cm_small_threshold
The number of elements of A after which we use BLAS-like kernel.
Definition: threshold.hpp:64
constexpr size_t gemm_nt_rr_small_threshold
The number of elements of B after which we use BLAS-like kernel (for GEMM)
Definition: threshold.hpp:57
constexpr size_t gemm_rr_medium_threshold
The number of elements of B after which we use BLAS-like kernel (for GEMM)
Definition: threshold.hpp:56
constexpr size_t fft1_many_threshold_transforms
The mimum number of transforms to parallelize them.
Definition: threshold.hpp:74
constexpr size_t gevm_rm_small_threshold
The number of elements of b after which we use BLAS-like kernel.
Definition: threshold.hpp:60
constexpr size_t vec_sum_parallel_threshold
The minimum number of elements before considering parallel acc implementation.
Definition: threshold.hpp:69
constexpr size_t gemm_rr_small_threshold
The number of elements of B after which we use BLAS-like kernel (for GEMM)
Definition: threshold.hpp:55
constexpr size_t fft1_many_threshold_n
The mimum size of the transforms to parallelize them.
Definition: threshold.hpp:75
constexpr size_t conv1_parallel_threshold_conv
The mimum output size before considering parallel convolution.
Definition: threshold.hpp:71
constexpr size_t gevm_cm_small_threshold
The number of elements of b after which we use BLAS-like kernel.
Definition: threshold.hpp:61
Root namespace for the ETL library.
Definition: adapter.hpp:15
constexpr size_t stream_threshold
The threshold at which stream is used.
Definition: threshold.hpp:80
constexpr size_t fft2_many_threshold_transforms
The mimum number of transforms to parallelize them.
Definition: threshold.hpp:77
constexpr size_t cache_size
Cache size of the machine.
Definition: config.hpp:168
constexpr size_t gemv_rm_small_threshold
The number of elements of A after which we use BLAS-like kernel.
Definition: threshold.hpp:63
constexpr size_t sum_parallel_threshold
The minimum number of elements before considering parallel acc implementation.
Definition: threshold.hpp:68
constexpr size_t parallel_threshold
The minimum number of elements before considering parallel implementation.
Definition: threshold.hpp:66
constexpr size_t gemm_cc_small_threshold
The number of elements of B after which we use BLAS-like kernel (for GEMM)
Definition: threshold.hpp:58
constexpr size_t fft2_many_threshold_n
The mimum size of the transforms to parallelize them.
Definition: threshold.hpp:78
constexpr size_t gemm_std_max
The maximum number of elements to be handled by std algorithm.
Definition: threshold.hpp:52
constexpr size_t conv1_parallel_threshold_kernel
The mimum kernel size before considering parallel convolution.
Definition: threshold.hpp:72