提交 f48227c0 编写于 作者: M Megvii Engine Team

feat(mgb): show more details for cuda driver api call

GitOrigin-RevId: 40e63d9dac062615ab533463b46c7dfc7a8c920f
上级 bb5af9b4
......@@ -85,7 +85,10 @@ void cuda::__throw_cusolver_error__(cusolverStatus_t err, const char* msg) {
}
void cuda::__throw_cuda_driver_error__(CUresult err, const char* msg) {
auto s = ssprintf("cuda driver error %d occurred; expr: %s", int(err), msg);
const char* err_str = nullptr;
cuGetErrorName(err, &err_str);
err_str = err_str ? err_str : "unknown error";
auto s = ssprintf("cuda driver error %d(%s) occurred; expr: %s", int(err), err_str, msg);
megdnn_throw(s.c_str());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册