-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdgemm_tune.h
34 lines (30 loc) · 993 Bytes
/
dgemm_tune.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// The size of packed A matrix is 3kB * GEMM_LOOP_TIMES_K, which should not exceed the capacity of L1 cache.
// The value of PREF_CYCLES_PACKED_A should be greater than the latency of L2 cache (in cycles).
// The value of PREF_CYCLES_PACKED_B should be greater than the latency of L3 cache (in cycles).
// Parameters tuned on AMD R7-3700X
# define GEMM_UNROLL_N 6
# define GEMM_LOOP_TIMES_N 16
# define GEMM_LOOP_TIMES_K 6
# define PREF_CYCLES_PACKED_A 18
# define PREF_CYCLES_PACKED_B 72
/* //Parameters tuned on i9 9900K
# define GEMM_UNROLL_N 4
# define GEMM_LOOP_TIMES_N 64
# define GEMM_LOOP_TIMES_K 8
# define PREF_CYCLES_PACKED_A 16
# define PREF_CYCLES_PACKED_B 96
*/
/*
# define GEMM_UNROLL_N 3
# define GEMM_LOOP_TIMES_N 32
# define GEMM_LOOP_TIMES_K 8
# define PREF_CYCLES_PACKED_A 12
# define PREF_CYCLES_PACKED_B 64
*/
/*
# define GEMM_UNROLL_N 2
# define GEMM_LOOP_TIMES_N 96
# define GEMM_LOOP_TIMES_K 8
# define PREF_CYCLES_PACKED_A 12
# define PREF_CYCLES_PACKED_B 64
*/