cpu_features icon indicating copy to clipboard operation
cpu_features copied to clipboard

Add avxifma feature detection on x86

Open TianyouLi opened this issue 1 year ago • 7 comments

Add avx-ifma detection according to the https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=1:_Extended_Features.

TianyouLi avatar Jun 12 '24 03:06 TianyouLi

@TianyouLi, could you add test from cpuid dump like this http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0A70F52_K19_Phoenix_01_CPUID.txt

OctalCore AMD Ryzen 9 8700G (Phoenix, Zen4 APU, supported: AVX512F/CD/VL/BW/DQ/VNNI/IFMA/VAES/GFNI/VPCLMUL/BITALG/VPOPCNTDQ/VBMI/VBMI2/BF16)

It looks like this CPU supports IFMA

toor1245 avatar Jun 27 '24 13:06 toor1245

@Mizux, JFYI tests failed

12 0.167 QEMU_VERSION: 7.1.0
#12 0.167 QEMU_TARGET: aarch64-linux-user
#12 0.169 Downloading http://wiki.qemu-project.org/download/qemu-7.1.0.tar.xz...
#12 135.7 failed: Connection timed out.
#12 270.9 failed: Connection timed out.
#12 408.1 failed: Connection timed out.
#12 [54](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:55)5.3 failed: Connection timed out.
#12 684.6 failed: Connection timed out.
#12 823.8 failed: Connection timed out.
#12 963.1 failed: Connection timed out.
#12 1104.4 failed: Connection timed out.
#12 1245.7 failed: Connection timed out.
#12 1389.1 failed: Connection timed out.
#12 1532.4 failed: Connection timed out.
#12 1675.8 failed: Connection timed out.
#12 1819.2 failed: Connection timed out.
#12 19[62](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:63).5 failed: Connection timed out.
#12 2105.9 failed: Connection timed out.
#12 2249.2 failed: Connection timed out.
#12 2392.6 failed: Connection timed out.
#12 2536.0 failed: Connection timed out.
#12 2[67](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:68)9.3 failed: Connection timed out.
#12 2822.7 failed: Connection timed out.
#12 ERROR: process "/bin/sh -c ./scripts/run_integration.sh qemu" did not complete successfully: exit code: 4

toor1245 avatar Jun 27 '24 13:06 toor1245

Hi @toor1245, sorry for the late response. Unfortunately I can not access the http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0A70F52_K19_Phoenix_01_CPUID.txt, but I do see it from https://github.com/InstLatx64/InstLatx64/blob/master/AuthenticAMD/AuthenticAMD0A70F52_K19_Phoenix_01_CPUID.txt. Would it be possible to kindly let me know which tool I should use to dump the CPUID info as required? Thanks.

TianyouLi avatar Sep 06 '24 02:09 TianyouLi

@Mizux, JFYI tests failed

12 0.167 QEMU_VERSION: 7.1.0
#12 0.167 QEMU_TARGET: aarch64-linux-user
#12 0.169 Downloading http://wiki.qemu-project.org/download/qemu-7.1.0.tar.xz...
#12 135.7 failed: Connection timed out.
#12 270.9 failed: Connection timed out.
#12 408.1 failed: Connection timed out.
#12 [54](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:55)5.3 failed: Connection timed out.
#12 684.6 failed: Connection timed out.
#12 823.8 failed: Connection timed out.
#12 963.1 failed: Connection timed out.
#12 1104.4 failed: Connection timed out.
#12 1245.7 failed: Connection timed out.
#12 1389.1 failed: Connection timed out.
#12 1532.4 failed: Connection timed out.
#12 1675.8 failed: Connection timed out.
#12 1819.2 failed: Connection timed out.
#12 19[62](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:63).5 failed: Connection timed out.
#12 2105.9 failed: Connection timed out.
#12 2249.2 failed: Connection timed out.
#12 2392.6 failed: Connection timed out.
#12 2536.0 failed: Connection timed out.
#12 2[67](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:68)9.3 failed: Connection timed out.
#12 2822.7 failed: Connection timed out.
#12 ERROR: process "/bin/sh -c ./scripts/run_integration.sh qemu" did not complete successfully: exit code: 4

strange the qemu 7.1.0 in the trace, we should be in 9.0.2 IIRC

%git grep -in QEMU_VERSION=
scripts/run_integration.sh:36:  local -r QEMU_VERSION=${QEMU_VERSION:=9.0.2}

Mizux avatar Sep 06 '24 09:09 Mizux

@Mizux, JFYI tests failed

12 0.167 QEMU_VERSION: 7.1.0
#12 0.167 QEMU_TARGET: aarch64-linux-user
#12 0.169 Downloading http://wiki.qemu-project.org/download/qemu-7.1.0.tar.xz...
#12 135.7 failed: Connection timed out.
#12 270.9 failed: Connection timed out.
#12 408.1 failed: Connection timed out.
#12 [54](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:55)5.3 failed: Connection timed out.
#12 684.6 failed: Connection timed out.
#12 823.8 failed: Connection timed out.
#12 963.1 failed: Connection timed out.
#12 1104.4 failed: Connection timed out.
#12 1245.7 failed: Connection timed out.
#12 1389.1 failed: Connection timed out.
#12 1532.4 failed: Connection timed out.
#12 1675.8 failed: Connection timed out.
#12 1819.2 failed: Connection timed out.
#12 19[62](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:63).5 failed: Connection timed out.
#12 2105.9 failed: Connection timed out.
#12 2249.2 failed: Connection timed out.
#12 2392.6 failed: Connection timed out.
#12 2536.0 failed: Connection timed out.
#12 2[67](https://github.com/google/cpu_features/actions/runs/9476145037/job/26117571709?pr=352#step:4:68)9.3 failed: Connection timed out.
#12 2822.7 failed: Connection timed out.
#12 ERROR: process "/bin/sh -c ./scripts/run_integration.sh qemu" did not complete successfully: exit code: 4

strange the qemu 7.1.0 in the trace, we should be in 9.0.2 IIRC

%git grep -in QEMU_VERSION=
scripts/run_integration.sh:36:  local -r QEMU_VERSION=${QEMU_VERSION:=9.0.2}

it is old message, so in the main branch it was fixed, maybe this branch need to rebase with main

toor1245 avatar Sep 06 '24 10:09 toor1245

Hi @toor1245, sorry for the late response. Unfortunately I can not access the http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0A70F52_K19_Phoenix_01_CPUID.txt, but I do see it from https://github.com/InstLatx64/InstLatx64/blob/master/AuthenticAMD/AuthenticAMD0A70F52_K19_Phoenix_01_CPUID.txt. Would it be possible to kindly let me know which tool I should use to dump the CPUID info as required? Thanks.

if you have CPU that supports avxifma, you can use cpuid tool to dump:

cpuid -r -1

As for https://github.com/InstLatx64/InstLatx64/blob/master/AuthenticAMD/AuthenticAMD0A70F52_K19_Phoenix_01_CPUID.txt

This is also the same source so there is no difference. This is used on the site, so there is no difference in taking cpu dump from the GitHub repository or from the site

toor1245 avatar Sep 06 '24 10:09 toor1245

@toor1245 again, terribly sorry for the late response. I got the cpuid dump and try to add an unitest. Could you please kindly review and let me know your thoughts? Thanks.

TianyouLi avatar Oct 08 '24 07:10 TianyouLi