Reset last cuda error (#2685)

as error is handled here (exception is being thrown), we do not
want cudaGetLastError() to return any errors.
pull/2689/head
Michał Walenciak 2 years ago committed by GitHub
parent 05d3f6eb17
commit 136b2d9e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,7 @@ do{
{ \
std::ostringstream sout; \
sout << "Error while calling " << #call << " in file " << __FILE__ << ":" << __LINE__ << ". ";\
sout << "code: " << error << ", reason: " << cudaGetErrorString(error);\
sout << "code: " << cudaGetLastError() << ", reason: " << cudaGetErrorString(error);\
throw dlib::cuda_error(sout.str()); \
} \
}while(false)

Loading…
Cancel
Save