CUDA tests pass, Knet gpu.jl fails

38 views
Skip to first unread message

Ross Andrew Donnachie

unread,
May 8, 2020, 6:27:48 AM5/8/20
to knet-users
using Pkg; Pkg.test(["CUDAnative", "CUDAdrv", "CUDAapi", "CuArrays"]);


Pkg.add("Knet");Pkg.build("Knet");
using Knet; include(Knet.dir("test/gpu.jl"));

[ Info: Precompiling Knet [1902f260-5fb4-5aff-8c31-6271790ab950]
Knet.gpuCount() = 0
Knet.gpu() = -1
Knet.tk = ["C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2"]
Knet.libknet8 = "C:\\Users\\Ross\\.julia\\packages\\Knet\\bTNMd\\deps\\libknet8"
Knet.cudartfound = false
Knet.nvmlfound = true
Knet.nvmlDriverVersion = "445.87"
Knet.nvmlVersion = "11.445.87"
gpu: Error During Test at C:\Users\Ross\.julia\packages\Knet\bTNMd\test\gpu.jl:3
  Got exception outside of a @test
  UndefVarError: lib not defined
  Stacktrace:
   [1] cudaDeviceGetPCIBusId(::Int64) at C:\Users\Ross\.julia\packages\Knet\bTNMd\src\gpu.jl:248
   [2] nvmlid(::Int64) at C:\Users\Ross\.julia\packages\Knet\bTNMd\src\gpu.jl:260
   [3] nvmlDeviceGetMemoryInfo() at C:\Users\Ross\.julia\packages\Knet\bTNMd\src\gpu.jl:270
   [4] top-level scope at show.jl:613
   [5] top-level scope at C:\Users\Ross\.julia\packages\Knet\bTNMd\test\gpu.jl:22
   [6] top-level scope at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Test\src\Test.jl:1113
   [7] top-level scope at C:\Users\Ross\.julia\packages\Knet\bTNMd\test\gpu.jl:5
   [8] include(::String) at .\client.jl:439
   [9] top-level scope at REPL[5]:1
   [10] eval(::Module, ::Any) at .\boot.jl:331
   [11] eval_user_input(::Any, ::REPL.REPLBackend) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:86
   [12] macro expansion at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:118 [inlined]
   [13] (::REPL.var"#26#27"{REPL.REPLBackend})() at .\task.jl:358

Test Summary: | Error  Total
gpu           |     1      1
ERROR: LoadError: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
in expression starting at C:\Users\Ross\.julia\packages\Knet\bTNMd\test\gpu.jl:3


I have tried to reset with gpu(-1) and then regrab with gpu(0) which still returns -1;
The CuArrays test correctly grabs my gpu:

[ Info: Testing using device GeForce GTX 1060 with Max-Q Design (compute capability 6.1.0, 4.969 GiB available memory) on CUDA driver 11.0.0 and toolkit 10.2.89
[ Info: Testing CUDNN 7.6.5

Any help to get Knet to use my gpu?

Thanks!

Deniz Yuret

unread,
May 8, 2020, 6:31:54 AM5/8/20
to Ross Andrew Donnachie, knet-users
Knet currently uses the NVIDIA compiler nvcc, so the full CUDA toolkit needs to be installed. Please refer to the installation section of the doc.

--
You received this message because you are subscribed to the Google Groups "knet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knet-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knet-users/2a329278-eb75-4a75-9921-2a8623cfbcf3%40googlegroups.com.

Ross Andrew Donnachie

unread,
May 8, 2020, 6:35:58 AM5/8/20
to knet-users
Apologies, I didn't mention it because it is such a clear point in the docs. I have installed the full CUDA toolkit and patched it with cuDNN.

> nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89


Thanks Prof. Yuret
To unsubscribe from this group and stop receiving emails from it, send an email to knet-...@googlegroups.com.

Ross Andrew Donnachie

unread,
May 8, 2020, 6:37:00 AM5/8/20
to knet-users
P.S. The toolkit etc was installed before Julia's CUDA packages.

Deniz Yuret

unread,
May 8, 2020, 7:02:26 AM5/8/20
to Ross Andrew Donnachie, knet-users
Knet/deps/build.jl seems to have an issue. build.log may have some clues. Or you may try `julia build.jl` in that directory to see what’s wrong.

On Fri, May 8, 2020 at 1:37 PM Ross Andrew Donnachie <radon...@gmail.com> wrote:
P.S. The toolkit etc was installed before Julia's CUDA packages.

--
You received this message because you are subscribed to the Google Groups "knet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knet-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knet-users/9dd22bf0-2f58-42df-a41c-68b7c60bfd3a%40googlegroups.com.

Iulian-Vasile Cioarca

unread,
May 8, 2020, 7:15:37 AM5/8/20
to knet-users
Did you try adding Knet#master? I think the fix was merged, but v1.3.6 is not released yet.

Ross Andrew Donnachie

unread,
May 8, 2020, 8:04:38 AM5/8/20
to knet-users
julia build.jl produced no output and build.log was empty.


On Friday, May 8, 2020 at 1:02:26 PM UTC+2, DENIZ YURET wrote:
Knet/deps/build.jl seems to have an issue. build.log may have some clues. Or you may try `julia build.jl` in that directory to see what’s wrong.
On Fri, May 8, 2020 at 1:37 PM Ross Andrew Donnachie <radon...@gmail.com> wrote:
P.S. The toolkit etc was installed before Julia's CUDA packages.

--
You received this message because you are subscribed to the Google Groups "knet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knet-...@googlegroups.com.

Ross Andrew Donnachie

unread,
May 8, 2020, 8:05:10 AM5/8/20
to knet-users
This solves it. <3

Many thanks for the responses and the work on Knet.

Much love!
Reply all
Reply to author
Forward
0 new messages