llama : remove redundant nullptr check in llm_arch_from_string

Since LLM_ARCH_NAMES is a const map, no spurious elements
with a NULL name are inserted anymore, so this check is dead code.
This commit is contained in:
Francis Couture-Harpin 2024-03-02 00:31:51 -05:00
parent 44e33d4f37
commit d8f7064cb1

View file

@ -810,9 +810,6 @@ static const std::map<llm_arch, std::map<llm_tensor, std::string>> LLM_TENSOR_NA
static llm_arch llm_arch_from_string(const std::string & name) { static llm_arch llm_arch_from_string(const std::string & name) {
for (const auto & kv : LLM_ARCH_NAMES) { // NOLINT for (const auto & kv : LLM_ARCH_NAMES) { // NOLINT
if (kv.second == nullptr) {
GGML_ASSERT(false && "missing architecture in LLM_ARCH_NAMES");
}
if (kv.second == name) { if (kv.second == name) {
return kv.first; return kv.first;
} }