diff --git a/mlx/backend/metal/device.cpp b/mlx/backend/metal/device.cpp index 1321fb8d9..cb851b57e 100644 --- a/mlx/backend/metal/device.cpp +++ b/mlx/backend/metal/device.cpp @@ -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