Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

MLX: version bump (#17637)

Daniel Hiltgenacdf81510d58
diff --git a/MLX_VERSION b/MLX_VERSION
index 758a91e11..442bd7f42 100644
--- a/MLX_VERSION
+++ b/MLX_VERSION
@@ -1 +1 @@
-b400c6ced2209d133582066f1014cc72fd92f71a
\ No newline at end of file
+8c28c385f86d17e1da427bf8d81afe084ee17c35
\ No newline at end of file
diff --git a/x/mlxrunner/mlx/CMakeLists.txt b/x/mlxrunner/mlx/CMakeLists.txt
index a431623b7..9dfd259d7 100644
--- a/x/mlxrunner/mlx/CMakeLists.txt
+++ b/x/mlxrunner/mlx/CMakeLists.txt
@@ -26,3 +26,25 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(mlx-c)
+
+# Stamp libmlx with the pinned commit's git describe so the built library
+# identifies its exact MLX commit, not just mlx/version.h's MAJOR.MINOR.PATCH.
+if(TARGET mlx_version AND DEFINED FETCHCONTENT_SOURCE_DIR_MLX)
+ execute_process(
+ COMMAND git describe --tags --first-parent --abbrev=7 --long --dirty --always
+ WORKING_DIRECTORY ${mlx_SOURCE_DIR}
+ OUTPUT_VARIABLE _mlx_git_version
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_QUIET
+ RESULT_VARIABLE _mlx_git_result
+ )
+ if(_mlx_git_result EQUAL 0 AND _mlx_git_version)
+ # Strip leading "v" prefix for consistency
+ string(REGEX REPLACE "^v" "" _mlx_git_version "${_mlx_git_version}")
+ get_target_property(_mlx_defs mlx_version COMPILE_DEFINITIONS)
+ list(FILTER _mlx_defs EXCLUDE REGEX "^MLX_VERSION=")
+ set_target_properties(mlx_version PROPERTIES COMPILE_DEFINITIONS "${_mlx_defs}")
+ target_compile_definitions(mlx_version PRIVATE "MLX_VERSION=\"${_mlx_git_version}\"")
+ message(STATUS "MLX version: ${_mlx_git_version}")
+ endif()
+endif()