llmodel: print an error if the CPU does not support AVX (#1499)

This commit is contained in:
cebtenzzre 2023-10-11 15:09:40 -04:00 committed by GitHub
parent f81b4b45bf
commit 7b611b49f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,9 +121,10 @@ const LLModel::Implementation* LLModel::Implementation::implementation(const cha
} }
LLModel *LLModel::Implementation::construct(const std::string &modelPath, std::string buildVariant) { LLModel *LLModel::Implementation::construct(const std::string &modelPath, std::string buildVariant) {
if (!has_at_least_minimal_hardware()) {
if (!has_at_least_minimal_hardware()) std::cerr << "LLModel ERROR: CPU does not support AVX\n";
return nullptr; return nullptr;
}
// Get correct implementation // Get correct implementation
const Implementation* impl = nullptr; const Implementation* impl = nullptr;