conda-forge / openblas-feedstock

A conda-smithy repository for openblas.
BSD 3-Clause "New" or "Revised" License
9 stars 38 forks source link

Need to use `make NUM_THREADS=64` or some other large number. #26

Closed mingwandroid closed 6 years ago

mingwandroid commented 7 years ago

.. otherwise the value is determined from the build machine instead and you'll fail to exploit high performance systems.

jakirkham commented 7 years ago

Agreed. This came up in another PR not long ago. FWICT NUM_THREADS is a misnomer as it has nothing really to do with the number of threads and everything to do with the maximum amount of memory available. So we should keep this in mind when choosing a value.

mingwandroid commented 7 years ago

It mostly affects stack space requirements and does directly concern the maximum amount of threads this build of openblas is able to launch in parallel. Less good CPUs are still able to cap this to sensible limits to prevent excessive thread eviction.

jakirkham commented 7 years ago

My understanding was that OpenBLAS would still detect the number of cores, which influences how many threads it launches. Does this change if we set NUM_THREADS? IIUC it does not.

mingwandroid commented 7 years ago

NUM_THREADS is a hard upper limit on the amount of threads that can be used. It's relatively inexpensive in terms of memory and more or less totally free in terms of performance.

jakirkham commented 7 years ago

Ok. Yeah I'm in favor of this change. Do you want to do a PR?

jschueller commented 7 years ago

In defaults they use 128