Skip to content

Commit 780c197

Browse files
authored
Fix test tolerance and patch bump (#1315)
1 parent eb8819e commit 780c197

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ option(MLX_METAL_JIT "Use JIT compilation for Metal kernels" OFF)
2424
option(BUILD_SHARED_LIBS "Build mlx as a shared library" OFF)
2525

2626
if(NOT MLX_VERSION)
27-
set(MLX_VERSION 0.16.1)
27+
set(MLX_VERSION 0.16.2)
2828
endif()
2929

3030
# --------------------- Processor tests -------------------------

python/tests/test_fast.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ def test_layer_norm_grad(self):
357357

358358
gx1, gw1, gb1 = mx.grad(f1, argnums=(0, 1, 2))(x, w, b, y)
359359
gx2, gw2, gb2 = mx.grad(f2, argnums=(0, 1, 2))(x, w, b, y)
360-
self.assertLess(mx.abs(gx1 - gx2).max(), 1e-5)
361-
self.assertLess(mx.abs(gw1 - gw2).max() / mx.abs(gw1).mean(), 1e-5)
362-
self.assertLess(mx.abs(gb1 - gb2).max() / mx.abs(gb1).mean(), 1e-5)
360+
self.assertLess(mx.abs(gx1 - gx2).max(), 5e-5)
361+
self.assertLess(mx.abs(gw1 - gw2).max() / mx.abs(gw1).mean(), 5e-5)
362+
self.assertLess(mx.abs(gb1 - gb2).max() / mx.abs(gb1).mean(), 5e-5)
363363

364364
def gf(f):
365365
def inner(x, w, b, y):
@@ -370,8 +370,8 @@ def inner(x, w, b, y):
370370

371371
gx1, gw1, gb1 = mx.grad(gf(f1), argnums=(0, 1, 2))(x, w, b, y)
372372
gx2, gw2, gb2 = mx.grad(gf(f2), argnums=(0, 1, 2))(x, w, b, y)
373-
self.assertLess(mx.abs(gx1 - gx2).max() / mx.abs(gx1).mean(), 1e-5)
374-
self.assertLess(mx.abs(gw1 - gw2).max() / mx.abs(gw1).mean(), 1e-5)
373+
self.assertLess(mx.abs(gx1 - gx2).max() / mx.abs(gx1).mean(), 5e-5)
374+
self.assertLess(mx.abs(gw1 - gw2).max() / mx.abs(gw1).mean(), 5e-5)
375375
self.assertLess(mx.abs(gb1).max(), 1e-9)
376376
self.assertLess(mx.abs(gb2).max(), 1e-9)
377377

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def run(self) -> None:
163163

164164
setup(
165165
name="mlx",
166-
version=get_version("0.16.1"),
166+
version=get_version("0.16.2"),
167167
author="MLX Contributors",
168168
author_email="[email protected]",
169169
description="A framework for machine learning on Apple silicon.",

0 commit comments

Comments
 (0)