-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build OpenBLAS from source code for MSVC #1674
Conversation
if(WIN32) | ||
if(MSVC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just curious why we check both of these. Is it common to use a compiler other than MSVC on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some people use MinGW (JuliaPackaging/Yggdrasil#9761), which provides layers for some POSIX APIs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty!
target_link_libraries(mlx PUBLIC ${BLAS_LIBRARIES}) | ||
|
||
if(WIN32) | ||
find_package(dlfcn-win32 REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to see this gone!
A USE_SYSTEM_DLFCN_WIN32
option could have kept it.
Refs #1513.
When building with MSVC, there is no central package manager that allows installing and searching third party packages, so we can not find BLAS with
find_package
.This PR adds a
MLX_BUILD_BLAS_FROM_SOURCE
flag to download and build OpenBLAS from source code which is turned on for MSVC by default. Other platforms can also set it on to test the same build.The
dlfcn-win32
dependency is also changed to build from source for the same reason.