Closed ilya-lavrenov closed 1 year ago
@ilya-lavrenov Thank you for the bug report. Could you tell me what Linux distribution, OS version and H/W (NVIDIA Jetson?) you use?
$ uname -a
Linux jetson-01 4.9.253-tegra #1 SMP PREEMPT Sat Feb 19 08:59:22 PST 2022 aarch64 aarch64 aarch64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"
Output of what commands can help as well?
$ uname -a Linux jetson-01 4.9.253-tegra #1 SMP PREEMPT Sat Feb 19 08:59:22 PST 2022 aarch64 aarch64 aarch64 GNU/Linux $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"
Output of what commands can help as well?
For now, the above information is enough. Thank you.
One more link with comments https://go.dev/src/internal/cpu/cpu_arm64_hwcap.go what we cannot use that register on older Linux versions, because access from user space is denied.
I reproduced the same error of sample/cpuinfo.exe
on Jetson.
I found the same topic was discussed at https://github.com/xianyi/OpenBLAS/issues/2715
I think it's good to introduce ARM Compute Library's method, /sys/devices/system/cpu/cpu[n]/regs/identification/midr_el1
first, /proc/cpuinfo
second. It didn't access system register which may be unaccecible from user programs. It can handle heterogeneous cores, where each core may have different MIDR_EL1 value, cache size and H/W capabilities.
Hi @kawakami-k Kindly asking, do you plan to work on the fix?
@ilya-lavrenov I'll fix the bug, but it may after my summer vacation :-)
@kawakami-k Hope you had a great summer holidays :) Have you been able to start working on this issue?
@ilya-lavrenov
Could you please try this branch. If it's suitable for you, I'll merge it to main branch. https://github.com/fujitsu/xbyak_aarch64/tree/capability
@kawakami-k
Thanks for the fix, SIGILL is eliminated.
cat /proc/cpuinfo
:I see that some other projects use guard before accessing this registers (code https://github.com/flame/blis/blob/915daaa43cd189c86d93d72cd249714f126e9425/frame/base/bli_cpuid.c#L1031C7-L1052):
Should the same be in xbyak arch64?
ARM Compute Library also has such a guard https://github.com/ARM-software/ComputeLibrary/blob/2b2ffe758dfff7255cf459a7eab26cb8aeff3061/src/common/cpuinfo/CpuInfo.cpp#L310-L323 and first tries to use registers, then tries to parse info from
/proc/cpu
files