| 10 | using namespace mlx::core; |
| 11 | |
| 12 | int main(int argc, char** argv) { |
| 13 | doctest::Context context; |
| 14 | |
| 15 | const char* device = std::getenv("DEVICE"); |
| 16 | if (device != nullptr && std::string(device) == "cpu") { |
| 17 | set_default_device(Device::cpu); |
| 18 | } else if (is_available(Device::gpu)) { |
| 19 | // Use generic GPU availability check (works for Metal on macOS, or CUDA on |
| 20 | // Linux/Windows) |
| 21 | set_default_device(Device::gpu); |
| 22 | } |
| 23 | |
| 24 | context.applyCommandLine(argc, argv); |
| 25 | return context.run(); |
| 26 | } |
nothing calls this directly
no test coverage detected