mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Reset last cuda error (#2685)
as error is handled here (exception is being thrown), we do not want cudaGetLastError() to return any errors.
This commit is contained in:
parent
05d3f6eb17
commit
136b2d9e5c
@ -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…
Reference in New Issue
Block a user