mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-03 22:34:43 +08:00
jagrit's commit files
This commit is contained in:
16
python/tests/mlx_tests.py
Normal file
16
python/tests/mlx_tests.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
|
||||
class MLXTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.default = mx.default_device()
|
||||
device = os.getenv("DEVICE", None)
|
||||
if device is not None:
|
||||
device = getattr(mx, device)
|
||||
mx.set_default_device(device)
|
||||
|
||||
def tearDown(self):
|
||||
mx.set_default_device(self.default)
|
Reference in New Issue
Block a user