only build for macos 14 and up (#2731)

* only build for macos 14 and up

* bump metal cpp
This commit is contained in:
Awni Hannun
2025-11-04 09:44:15 -08:00
committed by GitHub
parent 910b3e3299
commit 26ceb507eb
15 changed files with 19 additions and 383 deletions

View File

@@ -1,9 +0,0 @@
import platform
if platform.system() == "Darwin":
version = tuple(map(int, platform.mac_ver()[0].split(".")))
major, minor = version[0], version[1]
if (major, minor) < (13, 5):
raise ImportError(
f"Only macOS 13.5 and newer are supported, not {major}.{minor}"
)

View File

@@ -28,7 +28,6 @@ NB_MODULE(core, m) {
m.doc() = "mlx: A framework for machine learning on Apple silicon.";
auto reprlib_fix = nb::module_::import_("mlx._reprlib_fix");
nb::module_::import_("mlx._os_warning");
nb::set_leak_warnings(false);
init_mlx_func(m);