Fix nax condition for iphone (#3083)

This commit is contained in:
Awni Hannun
2026-01-29 13:30:37 -08:00
committed by GitHub
parent fcbdd05022
commit cc6e4eebad
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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()
+4 -2
View File
@@ -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();