-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse cpu a76 core as a55 result in serious performance problem #195
Comments
Nobody reply?OK Line 189 in 76d5e8f
We can not use a physical cpu cluster device node to parse directly ,because cpu arch is changing all the time. |
I think some of that is being added as part of RISC-V bringup, but I wonder if it could be landed separately... |
Hi,malfet, what is means about " I wonder if it could be landed separately". |
I suspect we're referring to PR #190 here, where we added the concept of In the RISC-V implementation, we tie the processor's uarch to the core_leader. This seems to be essentially the problem you're flagging on ARM - logical processors on the same physical core are guaranteed to have one uarch, but multiple physical cores tied to the same cluster don't necessarily have to be the same uarch. I think what malfet@ meant by 'it could be landed separately' is whether #190 might somehow block you, because 2 weeks ago at the comment, it was not yet landed. However, these paths are completely independent, so you could put up a fix for this in ARM without worrying about RISC-V. In regards to how to make this issue a PR, just create a PR separately and follow this guide to link your PR to this issue. |
Application: Cpuinfo: cpuinfo_arm_linux_init->cpuinfo_linux_detect_core_siblings->cluster_siblings_parser
|
Platform:android_arm64-android13
SOC: cortex A 4a55 and 4a76
Cpuinfo:core_siblings_list:0-7
HW:design 4a55 and 4a76 as a cluster on SOC and configure dtsi cpu 8core as a cluster.
Problem:Use benchmark tools test CPU performance,find cpuinfo parser cpu a76 core as a55 result in serious performance problem on Arm CPU
The cpuinfo call the main function as the following:
https://github.com/pytorch/cpuinfo/blob/76d5e8f5b563daa65340a60fce0e9aec73a936df/src/arm/linux/init.c#L34C37-L34C37
Use processors[0].package_leader_id update processors[sibling].package_leader_id(siblings value form 0 to 7).
Result in processors[i].package_leader_id value is 0.(i form 0 to 7)
Due to processors[processor].package_leader_id (processor from 0 to 7) is 0, cluster_leader value is 0 all the time.
cpuinfo/src/arm/linux/init.c
Line 368 in 76d5e8f
cpuinfo/src/arm/linux/init.c
Line 383 in 76d5e8f
arm_linux_processors[i].uarch = arm_linux_processors[cluster_leader].uarch;
Use arm_linux_processors[0].uarch update arm_linux_processors[i].uarch(i from o0 to 7),Reulst in
arm_linux_processors[i].uarch is the same as update arm_linux_processors[0].uarch which is a55(0x00300355 in the cpuinfo.h)
cpuinfo/include/cpuinfo.h
Line 409 in 76d5e8f
Please give me some advices.
BR.
Xiaotong
The text was updated successfully, but these errors were encountered: