return library if it is successfully loaded (#2131)

This commit is contained in:
Alex Chi Z. 2025-04-29 10:30:36 -04:00 committed by GitHub
parent 167b759a38
commit b36dd472bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -166,6 +166,7 @@ MTL::Library* load_library(
<< error->localizedDescription()->utf8String();
throw std::runtime_error(msg.str());
}
return lib;
}
// We have been given a path so try to load from lib_path / lib_name.metallib
@ -178,6 +179,7 @@ MTL::Library* load_library(
<< "> with error " << error->localizedDescription()->utf8String();
throw std::runtime_error(msg.str());
}
return lib;
}
// Try to load the colocated library