mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Integrate new AVX512 functions in the speed test
This commit is contained in:
parent
bba98c3e63
commit
25e8436534
2 changed files with 167 additions and 1 deletions
162
cmdline/speed.c
162
cmdline/speed.c
|
|
@ -284,6 +284,7 @@ void speed(int period, int nd, int size)
|
|||
printf("%8s", "avx2");
|
||||
#ifdef CONFIG_X86_64
|
||||
printf("%8s", "avx2e");
|
||||
printf("%8s", "avx512");
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
|
@ -338,6 +339,19 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
printf("%8s", "");
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
raid_gen1_avx512bw(nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -397,6 +411,19 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
printf("%8s", "");
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
raid_gen2_avx512bw(nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -522,6 +549,16 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
raid_gen3_avx512bw(nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
|
@ -587,6 +624,16 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
raid_gen4_avx512bw(nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
|
@ -652,6 +699,16 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
raid_gen5_avx512bw(nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
|
@ -717,6 +774,16 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
raid_gen6_avx512bw(nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
|
@ -730,6 +797,9 @@ void speed(int period, int nd, int size)
|
|||
#ifdef CONFIG_X86
|
||||
printf("%8s", "ssse3");
|
||||
printf("%8s", "avx2");
|
||||
#ifdef CONFIG_X86_64
|
||||
printf("%8s", "avx512");
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -774,6 +844,21 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
/* ensure to use same hardware in the delta step */
|
||||
raid_gen_force(1, raid_gen1_avx512bw);
|
||||
/* +1 to avoid GEN1 optimized case */
|
||||
raid_rec1_avx512bw(1, id, ip + 1, nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -814,7 +899,7 @@ void speed(int period, int nd, int size)
|
|||
SPEED_START {
|
||||
/* ensure to use same hardware in the delta step */
|
||||
raid_gen_force(2, raid_gen2_avx2);
|
||||
/* +1 to avoid GEN1 optimized case */
|
||||
/* +1 to avoid GEN2 optimized case */
|
||||
raid_rec2_avx2(2, id, ip + 1, nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
|
|
@ -822,6 +907,21 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
/* ensure to use same hardware in the delta step */
|
||||
raid_gen_force(2, raid_gen2_avx512bw);
|
||||
/* +1 to avoid GEN2 optimized case */
|
||||
raid_rec2_avx512bw(2, id, ip + 1, nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -871,6 +971,21 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
/* ensure to use same hardware in the delta step */
|
||||
raid_gen_force(3, raid_gen3_avx512bw);
|
||||
/* +1 to avoid GEN1 optimized case */
|
||||
raid_recX_avx512bw(3, id, ip, nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -921,6 +1036,21 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
/* ensure to use same hardware in the delta step */
|
||||
raid_gen_force(4, raid_gen4_avx512bw);
|
||||
/* +1 to avoid GEN1 optimized case */
|
||||
raid_recX_avx512bw(4, id, ip, nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -970,6 +1100,21 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
/* ensure to use same hardware in the delta step */
|
||||
raid_gen_force(5, raid_gen5_avx512bw);
|
||||
/* +1 to avoid GEN1 optimized case */
|
||||
raid_recX_avx512bw(5, id, ip, nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
|
||||
|
|
@ -1019,6 +1164,21 @@ void speed(int period, int nd, int size)
|
|||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_X86_64
|
||||
#ifdef CONFIG_AVX512BW
|
||||
if (raid_cpu_has_avx512bw()) {
|
||||
SPEED_START {
|
||||
/* ensure to use same hardware in the delta step */
|
||||
raid_gen_force(6, raid_gen6_avx512bw);
|
||||
/* +1 to avoid GEN1 optimized case */
|
||||
raid_recX_avx512bw(6, id, ip, nd, size, v);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("%8" PRIu64, ds / dt);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
printf("\n");
|
||||
printf("\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue