diff --git a/mlx/backend/common/lapack.h b/mlx/backend/common/lapack.h index b3bb7ebf0..42d937785 100644 --- a/mlx/backend/common/lapack.h +++ b/mlx/backend/common/lapack.h @@ -2,6 +2,15 @@ #pragma once +// Required for Visual Studio. +// https://github.com/OpenMathLib/OpenBLAS/blob/develop/docs/install.md +#ifdef _MSC_VER +#include +#define LAPACK_COMPLEX_CUSTOM +#define lapack_complex_float std::complex +#define lapack_complex_double std::complex +#endif + #ifdef ACCELERATE_NEW_LAPACK #include #else