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:
parent
44e33d4f37
commit
d8f7064cb1
1 changed files with 0 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue