diff options
author | Lukas Cavigelli <cavigelli@iis.ee.ethz.ch> | 2016-06-30 01:56:55 +0300 |
---|---|---|
committer | Lukas Cavigelli <cavigelli@iis.ee.ethz.ch> | 2016-06-30 01:56:55 +0300 |
commit | f77b890e06d7514e3a3e173923d374ae3274f49c (patch) | |
tree | 3be92521573b30b29fce93f5c1b19b8a41cad88e /ffi.lua | |
parent | 27b8221b90d87d7f29b2c048e7dde0ce2d9cc4dd (diff) |
added driver version check
Diffstat (limited to 'ffi.lua')
-rw-r--r-- | ffi.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |