CudaException 98 "Invalid device function"
coder39248583 opened this issue · comments
Windows 7 x64
Cuda 10.1
Visual Studio 2019
Cpu supports AVX
Single threaded application
Effected Versions:
--FaceRecognitionDotNet >=v1.2.3.13
--DlibDotNet >=v19.20.0.20200725
Code:
var faces = faceRecognition.FaceLocations(image, 0, Model.Cnn).ToArray();
// cudaexception 98 "invalid device function"
The problem was introduced with DlibDotNet v19.20.0.20200725. In previous versions it works:
// DlibDotNet >=v19.20.0.20200725
var faces = faceRecognition.FaceLocations(image, 0, Model.Cnn).ToArray();
// cudaexception 98 "invalid device function"
// DlibDotNet <=v19.18.0.20200525
var faces = faceRecognition.FaceLocations(image, 0, Model.Cnn).ToArray();
// success
Exception details:
DlibDotNet.CudaException: Exception of type 'DlibDotNet.CudaException was thrown'
DllName: DlibDotNetNativeDnn
DriverVersion: 11030
RuntimeVersion: 10010
ErrorCode: 98
ErrorMessage: invalid device function
ErrorName: cudaErrorInvalidDeviceFunction
Source: DlibDotNet
StackTrace:
at DlibDotNet.Dnn.Cuda.ThrowCudaException(ErrorType error)
at DlibDotNet.Dnn.LossMmod.Operator[T](IEnumerable`1 images, UInt64 batchSize)
at FaceRecognitionDotNet.Dlib.Python.CnnFaceDetectionModelV1.Detect(LossMmod net, Image image, Int32 upsampleNumTimes)
at FaceRecognitionDotNet.FaceRecognition.<FaceLocations>d__18.MoveNext()
Dependency walker finds no missing dependencies in DlibDotNetNativeDnn.dll
@coder39248583
Please note the following things
- GPU models
- cuDNN version
Nvidia GT 710 (Kepler 2.0) (3.5 compute capability)
Cudnn 7.6.3
Cuda 10.1 runtime
Cuda 11.3 driver
@coder39248583
dlib 19.20 drops sm30 and requires sm50.
davisking/dlib@5612caa...5a80ca9#diff-49efe726bb1d239c7d05dd384d1373297dfac8392bd41748eb5e45fd618702ff
And DlibDotNet introduce this update on 2020/07/25.
So v19.20.0.20200725 could not support sm3.5 due to dlib.
@takuya-takeuchi
That makes sense. I guess I will use cpu then.
Thank you for answering!