| 269 | } |
| 270 | |
| 271 | bool Llm::checkFile(const std::string& path, const char* name) { |
| 272 | if (!MNNFileExist(path.c_str())) { |
| 273 | MNN_ERROR("[Error]: %s not found: %s\n", name, path.c_str()); |
| 274 | return false; |
| 275 | } |
| 276 | std::ifstream f(path); |
| 277 | if (!f.is_open()) { |
| 278 | MNN_ERROR("[Error]: Failed to open %s (permission denied?): %s\n", name, path.c_str()); |
| 279 | return false; |
| 280 | } |
| 281 | return true; |
| 282 | } |
| 283 | |
| 284 | bool Llm::load() { |
| 285 | // check required files before loading |
nothing calls this directly
no test coverage detected