From 142b77751da89e5111223b5fce4e96c1ded90101 Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 11 Feb 2025 12:53:05 +0900 Subject: [PATCH] Fix compilation error on Windows (#1844) --- mlx/backend/cpu/jit_compiler.cpp | 2 +- mlx/backend/cpu/simd/base_simd.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mlx/backend/cpu/jit_compiler.cpp b/mlx/backend/cpu/jit_compiler.cpp index 0a7ff3eb0..632e71fca 100644 --- a/mlx/backend/cpu/jit_compiler.cpp +++ b/mlx/backend/cpu/jit_compiler.cpp @@ -54,7 +54,7 @@ struct VisualStudioInfo { std::string value = line.substr(pos + 1); if (name == "LIB") { libpaths = str_split(value, ';'); - } else if (name == "VCToolsInstallDir") { + } else if (name == "VCToolsInstallDir" || name == "VCTOOLSINSTALLDIR") { cl_exe = fmt::format("{0}\\bin\\Host{1}\\{1}\\cl.exe", value, arch); } } diff --git a/mlx/backend/cpu/simd/base_simd.h b/mlx/backend/cpu/simd/base_simd.h index c1e867811..37fc576a0 100644 --- a/mlx/backend/cpu/simd/base_simd.h +++ b/mlx/backend/cpu/simd/base_simd.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace mlx::core::simd { template