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

Method test_device_count

python/tests/test_device.py:117–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115
116class TestDeviceInfo(mlx_tests.MLXTestCase):
117 def test_device_count(self):
118 cpu_count = mx.device_count(mx.cpu)
119 self.assertIsInstance(cpu_count, int)
120 self.assertEqual(cpu_count, 1)
121
122 gpu_count = mx.device_count(mx.gpu)
123 self.assertIsInstance(gpu_count, int)
124 self.assertGreaterEqual(gpu_count, 0)
125
126 def test_device_info_cpu(self):
127 info = mx.device_info(mx.cpu)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected