From ada8ab3ea36f4ce3fbc68913140dff51c9e0d879 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 29 Oct 2020 16:47:05 +0100 Subject: [PATCH 1/2] Fix NVML discovery on Windows. --- lib/nvml/NVML.jl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/nvml/NVML.jl b/lib/nvml/NVML.jl index ff3529d243..039465b369 100644 --- a/lib/nvml/NVML.jl +++ b/lib/nvml/NVML.jl @@ -8,7 +8,20 @@ using CEnum using Libdl -libnvml() = Sys.iswindows() ? "nvml" : "libnvidia-ml.so.1" +function libnvml() + if Sys.iswindows() + # the NVSMI dir isn't added to PATH by the installer + nvsmi = joinpath(ENV["ProgramFiles"], "NVIDIA Corporation", "NVSMI") + if isdir(nvsmi) + joinpath(nvsmi, "nvml.dll") + else + # let's just hope for the best + "nvml" + end + else + "libnvidia-ml.so.1" + end +end has_nvml() = Libdl.dlopen(libnvml(); throw_error=false) !== nothing # core library From e686d2816b8fbd960513d3d0a7838f5edb8710e0 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 29 Oct 2020 16:47:29 +0100 Subject: [PATCH 2/2] Use consistent path separators during tests. --- test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index e27b08a497..c8fa9b3440 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -80,8 +80,8 @@ for (rootpath, dirs, files) in walkdir(@__DIR__) end ## GPUArrays testsuite for name in keys(TestSuite.tests) - push!(tests, "gpuarrays/$name") - test_runners["gpuarrays/$name"] = ()->TestSuite.tests[name](CuArray) + push!(tests, "gpuarrays$(Base.Filesystem.path_separator)$name") + test_runners["gpuarrays$(Base.Filesystem.path_separator)$name"] = ()->TestSuite.tests[name](CuArray) end unique!(tests)