mirror of
https://github.com/ml-explore/mlx.git
synced 2025-07-21 16:51:15 +08:00
return library if it is successfully loaded
This commit is contained in:
parent
99b9868859
commit
9092ff772e
@ -166,6 +166,7 @@ MTL::Library* load_library(
|
|||||||
<< error->localizedDescription()->utf8String();
|
<< error->localizedDescription()->utf8String();
|
||||||
throw std::runtime_error(msg.str());
|
throw std::runtime_error(msg.str());
|
||||||
}
|
}
|
||||||
|
return lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have been given a path so try to load from lib_path / lib_name.metallib
|
// 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();
|
<< "> with error " << error->localizedDescription()->utf8String();
|
||||||
throw std::runtime_error(msg.str());
|
throw std::runtime_error(msg.str());
|
||||||
}
|
}
|
||||||
|
return lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to load the colocated library
|
// Try to load the colocated library
|
||||||
|
Loading…
Reference in New Issue
Block a user