Skip to content
Merged

mlx 0.32.4 #318635

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Formula/m/mlx-c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ class MlxC < Formula
url "https://github.com/ml-explore/mlx-c/archive/refs/tags/v0.7.0.tar.gz"
sha256 "ee726bb38e191bb3c516a6bae47dc8abad9e5f273873385839019ce46bfceab5"
license "MIT"
revision 1
compatibility_version 2

bottle do
sha256 cellar: :any, arm64_golden_gate: "a5ae3a6a1125b04b54580827328ea14f6d4190d3e8151d83d371a4f366ecc8d7"
sha256 cellar: :any, arm64_tahoe: "dbbe74c005ad08d027826528ad87db48b172f736288324fa2f9772df892e290c"
sha256 cellar: :any, arm64_sequoia: "73bd77660cfd3aa0b40edb6d4d652cb5062a0c8ec0d5fe06550633ad1fa7cfc4"
sha256 cellar: :any, arm64_golden_gate: "bc630d594ae8232913f188c87a8d340469a97478000ac46045da4c893510feea"
sha256 cellar: :any, arm64_tahoe: "a11108e16e96648fc6c39b1b352f5ea3aed44b945e95aaf39687f5b12d1daf41"
sha256 cellar: :any, arm64_sequoia: "7288ed180ed242a6a946b27c0e9ee5adaf20d1bdffed03504dcc937e088dfe74"
end

depends_on "cmake" => :build
Expand Down
9 changes: 5 additions & 4 deletions Formula/m/mlx-lm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ class MlxLm < Formula
url "https://files.pythonhosted.org/packages/96/6f/c87a4e092194c77b39e65de7979147314e4486d9451e873b4124ba2d6dcd/mlx_lm-0.32.0.tar.gz"
sha256 "035ca44b08c3476630a205d2c9bdea26825a6a8359f974944d4985230e41859f"
license "MIT"
revision 1
head "https://github.com/ml-explore/mlx-lm.git", branch: "main"

bottle do
sha256 cellar: :any, arm64_golden_gate: "8232953876a552f1d16ff85841193cb1fd73fb22411d6cbbfca2d2f5fefe990c"
sha256 cellar: :any, arm64_tahoe: "c01c40cdf7a2a4d62af4b3d2f9ac6ef4725570fa81f915283ed63cd639be9b40"
sha256 cellar: :any, arm64_sequoia: "57ff14cabff500a10b6f65b6b3ad14a2f14d2a11b0d453dc64db58bd9c85ef4e"
sha256 cellar: :any, arm64_golden_gate: "f2e008dc5277a7694adb2e046d79319ee92ca4c9056b67d94a12efe5754f984c"
sha256 cellar: :any, arm64_tahoe: "195f1882169a1cb36daef93ea4287ffcc6f1d93b52c5f3c236a6bacbd8b90309"
sha256 cellar: :any, arm64_sequoia: "69a2363de78b1f9de16c58bf6d93653fee612569eac26d531a4e2b8ad32880a3"
end

depends_on "cmake" => :build
Expand All @@ -24,7 +25,7 @@ class MlxLm < Formula
depends_on "mlx"
depends_on "numpy"
depends_on "protobuf"
depends_on "python@3.14"
depends_on "python@3.15"
depends_on "sentencepiece"

pypi_packages exclude_packages: %w[certifi mlx numpy]
Expand Down
58 changes: 7 additions & 51 deletions Formula/m/mlx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,24 @@ class Mlx < Formula

desc "Array framework for Apple silicon"
homepage "https://ml-explore.github.io/mlx/build/html/index.html"
url "https://github.com/ml-explore/mlx/archive/refs/tags/v0.32.4.tar.gz"
sha256 "0276db8d7bf1af8db6d4ae25c7c550abea4d5b3b6a16207610a5d4a0c19fe1a0"
license all_of: [
"MIT", # main license
"Apache-2.0", # metal-cpp resource
]
compatibility_version 6
compatibility_version 7
head "https://github.com/ml-explore/mlx.git", branch: "main"

stable do
url "https://github.com/ml-explore/mlx/archive/refs/tags/v0.32.3.tar.gz"
sha256 "4129039ddcb36cb860982b616c975a5b9b8e6d8fa97efa86335b4427c29c4b4b"

# TODO: Remove when a release includes the macOS 27 fix in upstream PR #4594.
# Adapted for this release's kernel layout: https://github.com/ml-explore/mlx/pull/4594
patch :DATA
end

livecheck do
url :stable
strategy :github_latest
end

bottle do
sha256 cellar: :any, arm64_golden_gate: "ff61d3f2794860355e1d9316ca61b227feb4f0a8a5a947a46c45f61504c8addb"
sha256 cellar: :any, arm64_tahoe: "03fd34f25a4f94239579087cf7857fe68c3efa80f3e4389116cd7c6f59ae32e3"
sha256 cellar: :any, arm64_sequoia: "2c339dc778676bb6fe85706cdba5fbd795de1f68d3eb849a157c05b0809e032e"
sha256 cellar: :any, arm64_golden_gate: "33535dc013f285ef6fbea2e9ddd6be2a6f3f71b48ae642e9d6253da55daaa669"
sha256 cellar: :any, arm64_tahoe: "ffa4d6ec493da3452637f438860f42cbbf1fc689cea0c5f358a0d3053ba1d4fb"
sha256 cellar: :any, arm64_sequoia: "6539ae6fa0ca10467bf410c065083646d143584fd2f7ab750054488a7a6ff4e4"
end

depends_on "cmake" => :build
Expand All @@ -39,7 +32,7 @@ class Mlx < Formula
depends_on xcode: ["15.0", :build] # for metal
depends_on arch: :arm64
depends_on macos: :sonoma
depends_on "python@3.14"
depends_on "python@3.15"

# https://github.com/ml-explore/mlx/blob/v#{version}/CMakeLists.txt
# Included in not_a_binary_url_prefix_allowlist.json
Expand Down Expand Up @@ -117,40 +110,3 @@ def install
system python3, "test.py"
end
end

__END__
--- a/mlx/backend/metal/kernels/gated_delta_update_nax.h
+++ b/mlx/backend/metal/kernels/gated_delta_update_nax.h
@@ -127,8 +127,8 @@
gemm_op
.template get_right_input_cooperative_tensor<AType, BType, CType>();
auto ct_c = gemm_op.template get_destination_cooperative_tensor<
- decltype(ct_a),
- decltype(ct_b),
+ metal::remove_addrspace_t<decltype(ct_a)>,
+ metal::remove_addrspace_t<decltype(ct_b)>,
CType>();

STEEL_PRAGMA_UNROLL
@@ -173,8 +173,8 @@
gemm_op
.template get_right_input_cooperative_tensor<AType, BType, CType>();
auto ct_c = gemm_op.template get_destination_cooperative_tensor<
- decltype(ct_a),
- decltype(ct_b),
+ metal::remove_addrspace_t<decltype(ct_a)>,
+ metal::remove_addrspace_t<decltype(ct_b)>,
CType>();

STEEL_PRAGMA_UNROLL
@@ -226,8 +226,8 @@

// Create matmul output in register
auto ct_c = gemm_op.template get_destination_cooperative_tensor<
- decltype(ct_a),
- decltype(ct_b),
+ metal::remove_addrspace_t<decltype(ct_a)>,
+ metal::remove_addrspace_t<decltype(ct_b)>,
CType>();

// Load A in to left operand registers
Loading