pytorch / cpuinfo

CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
BSD 2-Clause "Simplified" License
996 stars 314 forks source link

cpuinfo_x86_normalize_brand_string #226

Closed fbarchard closed 2 months ago

fbarchard commented 7 months ago

Fix cpuinfo_x86_normalize_brand_string unannotated fall-through warning

fbarchard commented 7 months ago

The issue was reported as XNNPack not building with the -Wimplicit-fallthrough flag https://github.com/google/XNNPACK/issues/6047 But when I apply the flag in XNNPack build the pytorch/cpuinfo has 2 build warnings. The first was a legitimate bug and fixed in https://github.com/pytorch/cpuinfo/pull/225 This one is not a bug, but the other cases are handled the same was as this PR.

XNNPack requires C11 but can work on VS2012 or GCC 4.9. If this PR is taken, x86 builds cleanly, but for ARM are more, but I didnt spot legitimate bugs, so I wasnt going to do the fallthru directives.