提交 5b796440 authored 作者: Frederic's avatar Frederic

Fix error handling.

上级 74bc7ab6
......@@ -8,7 +8,7 @@ static inline const char *cudnnGetErrorString(cudnnStatus_t err) {
case CUDNN_STATUS_SUCCESS:
return "The operation completed successfully.";
case CUDNN_STATUS_NOT_INITIALIZED:
return "The handle was not initialized.";
return "The handle was not initialized(Is your driver recent enought?).";
case CUDNN_STATUS_ALLOC_FAILED:
return "Ressource allocation failed inside the library.";
case CUDNN_STATUS_BAD_PARAM:
......
......@@ -49,6 +49,11 @@ cudnnConvolutionDescriptor_t op%(id)d;
def c_init_code_struct(self, node, struct_id, sub):
return """
handle%(id)d = NULL;
input%(id)d = NULL;
output%(id)d = NULL;
kerns%(id)d = NULL;
op%(id)d = NULL;
cudnnStatus_t err%(id)d;
if ((err%(id)d = cudnnCreate(&handle%(id)d)) != CUDNN_STATUS_SUCCESS) {
PyErr_Format(PyExc_RuntimeError, "could not create cudnn handle: %%s",
......@@ -210,7 +215,7 @@ if (err%(name)s != CUDNN_STATUS_SUCCESS) {
fail=sub['fail'], id=sub['struct_id'], name=name)
def c_code_cache_version(self):
return (3,)
return (4,)
from theano.sandbox.cuda.opt import (local_optimizer, gpu_contiguous,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论