Julia: Interface to get CPU info

Created on 21 Jul 2017  路  6Comments  路  Source: JuliaLang/julia

As briefly discussed in https://github.com/JuliaLang/julia/pull/22846 it would be quite useful for some algorithms to know the CPU cache size in order to branch based on the input size when looping over arrays. Right now I picked an arbitrary power of two that just happened to work on my laptop, and that really seems like a slippery sloppy slope.

On Linux, it looks like I can get the right information from /proc/cpuinfo, but I am somewhat clueless about and unable to test how to get this information on any other platform. So I'm a little wary of venturing into this area unguided ...

Does someone else have any experience with this? Or is this information already available somewhere undocumented? ... or documented? :slightly_frowning_face:

Most helpful comment

All 6 comments

We can have tighter integration of hwloc but don't use the cpuid package.

Is there anything to be done in base?

Depending on if there's any code in base that want to use this we might want to integrate it in base.

Let's hold off on that. It's easier to move it in if that turns out to be good than move it out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

musm picture musm  路  3Comments

omus picture omus  路  3Comments

TotalVerb picture TotalVerb  路  3Comments

wilburtownsend picture wilburtownsend  路  3Comments

ararslan picture ararslan  路  3Comments