(self)
| 115 | |
| 116 | class 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) |
nothing calls this directly
no outgoing calls
no test coverage detected