mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 17:31:16 +08:00
return library if it is successfully loaded (#2131)
This commit is contained in:
parent
167b759a38
commit
b36dd472bb
@ -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