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

Use correct versions for library discovery. #588

Merged
merged 1 commit into from
Feb 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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