From a0367f46afb9586a2444ef28eb5ea95b5ec2ef96 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 11 Feb 2020 07:53:42 +0100 Subject: [PATCH] Use correct versions for library discovery. --- src/CuArrays.jl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/CuArrays.jl b/src/CuArrays.jl index 97f9e159..fcdde223 100644 --- a/src/CuArrays.jl +++ b/src/CuArrays.jl @@ -67,8 +67,13 @@ function __init__() try # discover libraries - toolkit = find_toolkit() - for name in ("cublas", "cusparse", "cusolver", "cufft", "curand", "cudnn", "cutensor") + for (name,version) in (("cublas", CUDAnative.version()), + ("cusparse", CUDAnative.version()), + ("cusolver", CUDAnative.version()), + ("cufft", CUDAnative.version()), + ("curand", CUDAnative.version()), + ("cudnn", v"7"), + ("cutensor", v"1")) mod = getfield(CuArrays, Symbol(uppercase(name))) lib = Symbol("lib$name") handle = getfield(mod, lib) @@ -82,7 +87,7 @@ function __init__() # check if we can't find the library if Libdl.dlopen_e(handle[]) == C_NULL - path = find_cuda_library(name, CUDAnative.prefix(), [CUDAnative.version()]) + path = find_cuda_library(name, CUDAnative.prefix(), [version]) if path !== nothing handle[] = path end