提交 0b3d176b authored 作者: Frederic Bastien's avatar Frederic Bastien

Don't be too strict in the support_code accepted.

上级 7dcb1922
...@@ -75,10 +75,11 @@ class GpuElemwise(HideC, Elemwise): ...@@ -75,10 +75,11 @@ class GpuElemwise(HideC, Elemwise):
pass pass
try: try:
support_code = self.scalar_op.c_support_code() support_code = self.scalar_op.c_support_code()
if (support_code.strip() != "#define THEANO_MACRO_MOD(x,y) (x % y)" and if "struct" in support_code:
support_code.strip() != ""):
# The macro is fine, the C++ struct is not. # The macro is fine, the C++ struct is not.
raise SupportCodeError(support_code) raise SupportCodeError(
"struct aren't supported in GpuElemwise support_code" +
support_code)
except MethodNotDefined: except MethodNotDefined:
pass pass
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论