提交 ee75da59 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added comment explaining why not to enable caching in parent op

上级 c3b88481
...@@ -827,6 +827,11 @@ class ScalarOp(Op): ...@@ -827,6 +827,11 @@ class ScalarOp(Op):
""" Returns a tuple of integers representing the version of the """ Returns a tuple of integers representing the version of the
scalar op's cuda_assign_reduce method. Must be unique across ops. scalar op's cuda_assign_reduce method. Must be unique across ops.
An empty tuple means not to use code caching for this op""" An empty tuple means not to use code caching for this op"""
# Because this is the abstract parent class, we must return ()
# Returning a non-empty tuple would enable caching for all scalar
# ops, and some ops may be incompatible with it
return () return ()
def c_code_cache_version(self): def c_code_cache_version(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论