Skip to content
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

[Feature] Windows support #1513

Open
zcbenz opened this issue Oct 22, 2024 · 1 comment
Open

[Feature] Windows support #1513

zcbenz opened this issue Oct 22, 2024 · 1 comment

Comments

@zcbenz
Copy link
Contributor

zcbenz commented Oct 22, 2024

I tried building MLX on Windows, of course it didn't build but I think it is not very hard to make it work there.

A few problems I met so far:

  • CMake can not find OpenBLAS automatically on Windows, I had to hardcode the path:
    -DBLAS_LIBRARIES=openblas64/lib/libopenblas.a -DLAPACK_LIBRARIES=openblas64/lib/libopenblas.a -DBLAS_INCLUDE_DIRS=openblas64/include -DLAPACK_INCLUDE_DIRS=openblas64/include
  • MSVC has no _Complex but lapack_complex_float is defined to it.
  • gguf-tools does not support Windows but we can turn off it with -DMLX_BUILD_GGUF=OFF.
  • io/load.h uses unix system calls for IO, I can make it work on Windows by replacing them with stdio.h equivalents.
  • The make_compiled_preamble.sh needs a Windows version.
  • mx.compile is going to need many works to find and call MSVC.

And there will likely be much more problems since compilations are mostly blocked by io/load.h.

I don't really like Windows nor enjoy working on it, but the majority of world is using it and I figured out whatever I'm going to work on I would need Windows support to reach wider audience. What do you think?

@zcbenz
Copy link
Contributor Author

zcbenz commented Oct 25, 2024

I found someone already did some work on this: https://github.com/lighttransport/mlx/commits/lte/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant