During the Multithreading BoF @kpamnany and I were discussing adding Hwloc as a dependency of julia itself.
Some reasons for adding it to julia would be to simplify the cpu detection code we have. Currently there is a lot of handwavy and convoluted code to get around hyperthreading and now efficiency cores that CPUs might have. We also have to keep track of a number of relevant cpus and their features, which is a small maintenance burden.
In addition we would be able to get cache sizes and other cpu details, which might be useful for some algorithms.
Oooh… as an HPC person hwloc is of course used frequently, and is an integral part of our builds.
HOWEVER if you are wanting to perform CPU recognition it is not the only game in town
Archspec has python bindings, though it’s basically a big JSON file. Which could be interesting. Pure julia wouldn’t be super helpful here, because ideally we want that information at the runtime, probably even at init time. So a C lib like hwloc might be easier to integrate.
@quinnj have you seen Base.BinaryPlatforms.CPUID. Which is the code I mentioned that is a bit annoying to maintain, it exposes those strings and ways to test them quite a bit easie rthan what you’ve done in ScanByte