Skip to content

Commit cc6e4ee

Browse files
author
Awni Hannun
authored
Fix nax condition for iphone (#3083)
1 parent fcbdd05 commit cc6e4ee

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ else()
329329
FetchContent_Declare(
330330
fmt
331331
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
332-
GIT_TAG 10.2.1
332+
GIT_TAG 12.1.0
333333
EXCLUDE_FROM_ALL)
334334
FetchContent_MakeAvailable(fmt)
335335
endif()

mlx/backend/metal/device.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@ inline bool is_nax_available() {
275275
macOS 26.2, iOS 26.2, tvOS 26.2, visionOS 26.2, *)) {
276276
can_use_nax = true;
277277
}
278-
can_use_nax &=
279-
metal::device(mlx::core::Device::gpu).get_architecture_gen() >= 17;
278+
auto& d = metal::device(mlx::core::Device::gpu);
279+
auto arch = d.get_architecture().back();
280+
auto gen = d.get_architecture_gen();
281+
can_use_nax &= gen >= (arch == 'p' ? 18 : 17);
280282
return can_use_nax;
281283
};
282284
static bool is_nax_available_ = _check_nax();

0 commit comments

Comments
 (0)