Skip to content

Commit d54813f

Browse files
committed
Bump mlx to >=0.27 and fix build-ext from week 1, day 7
Resolves #50, applies the patch from there and updates pyproject / lockfile to specify newer version of mlx.
1 parent 26aa2ff commit d54813f

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

pdm.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ version = "0.1.0"
88
requires-python = ">=3.10, <3.13"
99
readme = "README.md"
1010
dependencies = [
11-
"mlx>=0.25.0",
11+
"mlx>=0.27.0",
1212
"torch>=2.6.0",
1313
"torchtune>=0.6.1",
1414
"torchao>=0.10.0",
15-
"mlx-lm>=0.23.0",
15+
"mlx-lm>=0.26.0",
1616
"numpy>=2.2.4",
1717
"pytest>=8.3.5",
1818
"ruff>=0.11.6",
1919
# this should not usually appear in a project dependency list but we add it to simplify the setup process
2020
"setuptools>=62",
2121
"nanobind==2.4.0",
22-
"pytest-benchmark>=5.1.0"
22+
"pytest-benchmark>=5.1.0",
2323
]
2424

2525
[tool.pdm.scripts]
@@ -48,7 +48,5 @@ copy-test.cmd = "python scripts/dev-tools.py copy-test"
4848
book.cmd = "mdbook serve book/"
4949

5050
[tool.pytest.ini_options]
51-
addopts = [
52-
"--import-mode=importlib",
53-
]
51+
addopts = ["--import-mode=importlib"]
5452
pythonpath = "src"

src/extensions/src/axpby.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ class Axpby : public mx::Primitive {
6363
const std::vector<int> &axes) override;
6464

6565
/** Print the primitive. */
66-
void print(std::ostream &os) override;
66+
void print(std::ostream &os);
6767

6868
/** Name of the primitive (not virtual in some MLX versions). */
69-
const char* name() const { return "Axpby"; }
69+
const char *name() const override { return "Axpby"; }
7070

7171
/** Equivalence check **/
7272
bool is_equivalent(const mx::Primitive &other) const override;

src/extensions/src/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace tiny_llm_ext {
99
void load_library(mx::Device d, const char *path) {
1010
#ifdef _METAL_
1111
auto &md = mx::metal::device(d);
12-
md.register_library("tiny_llm_ext", path);
12+
md.get_library("tiny_llm_ext", path);
1313
#endif
1414
}
1515

0 commit comments

Comments
 (0)