OpenMathLib / OpenBLAS

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
http://www.openblas.net
BSD 3-Clause "New" or "Revised" License
6.31k stars 1.49k forks source link

[windows] sgemm call gets stuck in multithreaded openBLAS #4844

Closed CascadingRadium closed 1 month ago

CascadingRadium commented 1 month ago

Summary

calling sgemm_ back to back in a loop causes a thread leak and the control never returns from it.

Platform

OS: Windows 10

openBLAS version: 0.3.26

Installed from: Self Compile

openBLAS compile options:

    cmake `
    -G Ninja `
    -DNOFORTRAN=ON `
    -DCMAKE_C_COMPILER=clang-cl `
    -DCMAKE_MAKE_PROGRAM="$NINJA" `
    -DBUILD_WITHOUT_LAPACK=0 `
    -DDYNAMIC_ARCH=1 `
    -DDYNAMIC_LIST="EXCAVATOR;HASWELL;ZEN;SKYLAKEX;COOPERLAKE;SAPPHIRERAPIDS" `
    -DBUILD_LAPACK_DEPRECATED=0 `
    -DBUILD_WITHOUT_CBLAS=1 `
    -DCMAKE_BUILD_TYPE=Release `
    -DCMAKE_INSTALL_PREFIX="$InstallDir" `
    -DBINARY=64 `
    -DUSE_THREAD=1 `
    -DNUM_THREADS=128 `
    -S ..

What did you do?

image

martin-frbg commented 1 month ago

This is probably related to recent changes (from PR #4359) made to improve multithreading performance on Windows. Could you try if #4835 fixes this for you (I think it should apply cleanly to 0.3.26) ? Unfortunately it is still unclear if the PR itself was problematic, or if it uncovers a pre-existing failure in our level 3 BLAS threading code for Windows.

CascadingRadium commented 1 month ago

thanks for the reply.. seeing the history of this issue i see that

we have decided to just rollback to v0.3.25 and the windows prod pipeline is now passing ... thanks

martin-frbg commented 1 month ago

Thanks for the confirmation. I hope to release 0.3.28 tomorrow (or on the upcoming weekend at the very latest)