-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(NPP) Shared Library loading issue on Linux #116
Comments
Hi, for the moment I can only check on an Ubuntu linux with Cuda 12.0 manually installed and there the corresponding symbolic link is present, i.e. Note that on linux the libs are named You say that you created a link named Could you please post a Cheers, |
Sorry, the |
I installed latest Cuda 12.1.1 on my Linux and all symbolic links are there. So I would consider this as a bug in the docker image and not a bug in ManagedCuda. |
I'm just thinking, since the private static readonly HashSet<string> _nppLibraries = new {
"nppc",
"nppial",
"nppicc",
"nppidei",
"nppif",
"nppig",
"nppim",
"nppist",
"nppisu",
"nppitc",
"npps"
};
private const string _libraryVersion = "12";
private static IntPtr ImportResolver(string libraryName, System.Reflection.Assembly assembly, DllImportSearchPath? searchPath)
{
if(!_nppLibraries.Contains(libraryName))
{
return IntPtr.Zero;
}
string? libToLoad = null;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
libToLoad = $"lib{libraryName}.so.{_libraryVersion}";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
libToLoad = $"{libraryName}64_{_libraryVersion}.dll";
}
// ... This also prevents accidental reference of incorrect version of libraries, if that matters. Anyways it's a simple fix in the Dockerfile if we keep it as is. |
Do you know if all cuda docker images are concerned or is it only the latest Cuda 12.1 one? Cheers, |
My program complains that it can't find
nppisu64_12
when running on Linux:The program is running inside a docker container, based on the
nvidia/cuda:12.1.1-runtime-ubuntu20.04
image. I can find thelibnppisu.so.12
file, but notlibnppisu.so
. Creating a link solved the problem.So the question is, should ManagedCuda try to explicitly load
libnppisu.so.12
, instead of generally loadnppisu
? The same goes for other shared libraries.Edit: fix file names, they don't have the
64
postfix in Linux.The text was updated successfully, but these errors were encountered: