Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
Use correct versions for library discovery.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Feb 11, 2020
1 parent 93493bc commit a0367f4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/CuArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit a0367f4

Please sign in to comment.