提交 080ed7e5 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix error message.

上级 c5d48a56
......@@ -2047,7 +2047,9 @@ GetDeviceMemInfo(PyObject* _unused, PyObject* dummy)
cudaError_t err = cudaMemGetInfo(&free, &total);
if (err != cudaSuccess){
PyErr_Format(PyExc_RuntimeError, "Error while getting memory info about the gpu %d");
PyErr_Format(PyExc_RuntimeError,
"Error while getting memory info about the gpu: %s",
cudaGetErrorString(err));
return NULL;
}
return PyTuple_Pack(2, PyLong_FromLong(free), PyLong_FromLong(total));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论