提交 e72c8872 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #6341 from notoraptor/fix-segfault-with-dnn-conv

Try to fix segmentation fault related to last updates in cuDNN conv codes.
......@@ -299,7 +299,9 @@ def struct_gen(args, struct_builders, blocks, sub):
// now I am tired of chasing segfaults because
// initialization code had an error and some pointer has
// a junk value.
#ifndef THEANO_DONT_MEMSET_STRUCT
memset(this, 0, sizeof(*this));
#endif
}
~%(name)s(void) {
cleanup();
......
......@@ -9,6 +9,9 @@ hash_prefix = std::string("FWD|GPU#");
int reuse_algo;
AlgoRec prev_algo;
std::string hash_prefix;
#define THEANO_DONT_MEMSET_STRUCT
#ifdef DEBUG
char algorithm_name[128];
#endif
......
......@@ -9,6 +9,9 @@ hash_prefix = std::string("GI|GPU#");
int reuse_algo;
AlgoRec prev_algo;
std::string hash_prefix;
#define THEANO_DONT_MEMSET_STRUCT
#ifdef DEBUG
char algorithm_name[128];
#endif
......
......@@ -9,6 +9,9 @@ hash_prefix = std::string("GW|GPU#");
int reuse_algo;
AlgoRec prev_algo;
std::string hash_prefix;
#define THEANO_DONT_MEMSET_STRUCT
#ifdef DEBUG
char algorithm_name[128];
#endif
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论