| 169 | #endif |
| 170 | |
| 171 | static inline bool check_gpu_available(size_t num) { |
| 172 | if (mgb::CompNode::get_device_count(mgb::CompNode::DeviceType::CUDA) < num) { |
| 173 | mgb_log_warn("skip test case that requires %zu GPU(s)", num); |
| 174 | return false; |
| 175 | } |
| 176 | return true; |
| 177 | } |
| 178 | #define REQUIRE_CUDA() \ |
| 179 | { \ |
| 180 | if (!check_gpu_available(1)) { \ |
no test coverage detected