Closed Danliran closed 4 years ago
@Maratyszcza Should we need to implement a function for arm linux hwinfo. Some vendor designed CPU based on ARM core.
`static void init_hwinfo(void) {
init_x86_hwinfo();
#elif !CPUINFO_ARCH_X86 && !CPUINFO_ARCH_X86_64 && defined(__APPLE__)
init_static_ios_hwinfo();
#elfi CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
init_arm_linux_hwinfo();
#else
init_static_hwinfo();
#endif
............
}`
NNPACK assumes 3-level cache hierarchy, but many ARM CPUs have only two levels of cache. Thus, adapting NNPACK to use the actual cache parameters is not straightforward, and as I don't actively work on NNPACK anymore, there are no plans to introduce two-level cache blocking.
Hi NNPACK team,
The function of init_hwinfo detect the hardware cache info, but if the platform is ARM/ARM64, the cache info is hard code in the function. I think we should detect these info from system or cpuinfo .
if !(CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64) || defined(ANDROID)
endif