check for system libraries

This commit is contained in:
Thien Tran 2025-06-03 21:41:27 +08:00 committed by Louis
parent 1eb49350e9
commit 65d6f34878
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -240,6 +240,13 @@ async function _isCudaInstalled(version: string): Promise<boolean> {
}
const libname = libnameLookup[key]
// check from system libraries first
// TODO: need to check for CuBLAS and CuBLASLt as well
if (await invoke<boolean>('is_library_available', { library: libname }))
return true
// check for libraries shipped with Jan's llama.cpp extension
const janDataFolderPath = await getJanDataFolderPath()
const cudartPath = await joinPath([janDataFolderPath, 'llamacpp', 'lib', libname])
return await fs.existsSync(cudartPath)