From cc6e4eebada0c77a80bdbdc1830dd9dc1a3ae2f5 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Thu, 29 Jan 2026 13:30:37 -0800 Subject: [PATCH] Fix nax condition for iphone (#3083) --- CMakeLists.txt | 2 +- mlx/backend/metal/device.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 457d4bf4..041a476c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,7 +329,7 @@ else() FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git - GIT_TAG 10.2.1 + GIT_TAG 12.1.0 EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(fmt) endif() diff --git a/mlx/backend/metal/device.h b/mlx/backend/metal/device.h index bf83b8cf..e6162d7d 100644 --- a/mlx/backend/metal/device.h +++ b/mlx/backend/metal/device.h @@ -275,8 +275,10 @@ inline bool is_nax_available() { macOS 26.2, iOS 26.2, tvOS 26.2, visionOS 26.2, *)) { can_use_nax = true; } - can_use_nax &= - metal::device(mlx::core::Device::gpu).get_architecture_gen() >= 17; + auto& d = metal::device(mlx::core::Device::gpu); + auto arch = d.get_architecture().back(); + auto gen = d.get_architecture_gen(); + can_use_nax &= gen >= (arch == 'p' ? 18 : 17); return can_use_nax; }; static bool is_nax_available_ = _check_nax();