MCPcopy Create free account
hub / github.com/ml-explore/mlx / test_failure

Method test_failure

python/tests/test_threads.py:14–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12 test_stream = mx.new_stream(mx.default_device())
13
14 def test_failure():
15 with self.assertRaises(RuntimeError):
16 with mx.stream(test_stream):
17 x = mx.arange(10)
18 mx.eval(2 * x)
19 mx.clear_streams()
20
21 t1 = threading.Thread(target=test_failure)
22 t2 = threading.Thread(target=test_failure)

Callers

nothing calls this directly

Calls 1

evalMethod · 0.45

Tested by

no test coverage detected