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

Method test_success

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

Source from the content-addressed store, hash-verified

28 test_stream = mx.new_thread_local_stream(mx.default_device())
29
30 def test_success():
31 with mx.stream(test_stream):
32 x = mx.arange(10)
33 mx.eval(2 * x)
34 self.assertEqual(x.tolist(), list(range(10)))
35 mx.clear_streams()
36
37 t1 = threading.Thread(target=test_success)
38 t2 = threading.Thread(target=test_success)

Callers

nothing calls this directly

Calls 1

evalMethod · 0.45

Tested by

no test coverage detected