Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Cavigelli <cavigelli@iis.ee.ethz.ch>2016-06-30 01:56:55 +0300
committerLukas Cavigelli <cavigelli@iis.ee.ethz.ch>2016-06-30 01:56:55 +0300
commitf77b890e06d7514e3a3e173923d374ae3274f49c (patch)
tree3be92521573b30b29fce93f5c1b19b8a41cad88e /ffi.lua
parent27b8221b90d87d7f29b2c048e7dde0ce2d9cc4dd (diff)
added driver version check
Diffstat (limited to 'ffi.lua')
-rw-r--r--ffi.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffi.lua b/ffi.lua
index 9e2cd5e..8a8f125 100644
--- a/ffi.lua
+++ b/ffi.lua
@@ -1,3 +1,4 @@
+require 'cutorch'
local ffi = require 'ffi'
ffi.cdef[[
@@ -1602,9 +1603,18 @@ Then make sure files named as libcudnn.so.5 or libcudnn.5.dylib are placed in yo
]])
end
+-- check cuDNN version
cudnn.version = tonumber(cudnn.C.cudnnGetVersion())
if cudnn.version < 5005 then
error('These bindings are for version 5005 or above, '
.. 'while the loaded CuDNN is version: ' .. cudnn.version
.. ' \nAre you using an older version of CuDNN?')
end
+
+-- cechk GPU driver version
+local props = cutorch.getDeviceProperties(cutorch.getDevice())
+if not(cutorch.driverVersion >= 7050 -- desktop GPUs
+ or (props.major == 5 and props.minor == 3 and cutorch.driverVersion >= 7000) ) -- Tegra X1
+then
+ error('Insufficient GPU driver version.')
+end \ No newline at end of file