diff --git a/extensions/llamacpp-extension/src/backend.ts b/extensions/llamacpp-extension/src/backend.ts index 82481fcda..7e4a9db9d 100644 --- a/extensions/llamacpp-extension/src/backend.ts +++ b/extensions/llamacpp-extension/src/backend.ts @@ -242,9 +242,18 @@ async function _isCudaInstalled(version: string): Promise { const libname = libnameLookup[key] // check from system libraries first - // TODO: need to check for CuBLAS and CuBLASLt as well - if (await invoke('is_library_available', { library: libname })) - return true + // TODO: might need to check for CuBLAS and CuBLASLt as well + if (os_type === 'linux') { + // not sure why libloading cannot find library from name alone + // using full path here + const libPath = `/usr/local/cuda/lib64/${libname}` + if (await invoke('is_library_available', { library: libPath })) + return true + } else if (os_type === 'windows') { + // TODO: test this on Windows + if (await invoke('is_library_available', { library: libname })) + return true + } // check for libraries shipped with Jan's llama.cpp extension const janDataFolderPath = await getJanDataFolderPath()