| 20 | } |
| 21 | |
| 22 | engine::core::BackendConfig cuda_backend() { |
| 23 | engine::core::BackendConfig backend; |
| 24 | #ifdef GGML_USE_CUDA |
| 25 | backend.type = engine::core::BackendType::Cuda; |
| 26 | #elif defined(GGML_USE_VULKAN) |
| 27 | backend.type = engine::core::BackendType::Vulkan; |
| 28 | #else |
| 29 | backend.type = engine::core::BackendType::Cpu; |
| 30 | #endif |
| 31 | backend.device = 0; |
| 32 | backend.threads = 1; |
| 33 | return backend; |
| 34 | } |
| 35 | |
| 36 | void require(bool condition, const std::string & message) { |
| 37 | if (!condition) { |