提交 8472d13a authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #3965 from harmdevries89/gpudnnpool2

gpu dnn pool takes tensor variables
...@@ -1845,7 +1845,7 @@ class _Linker(gof.link.LocalLinker): ...@@ -1845,7 +1845,7 @@ class _Linker(gof.link.LocalLinker):
thunk.outputs = [storage_map[v] for v in node.outputs] thunk.outputs = [storage_map[v] for v in node.outputs]
thunk_other = thunk thunk_other = thunk
else: else:
new_node = node.op.prepare_node(node) new_node = node.op.prepare_node(node, storage_map, compute_map)
if new_node is not None: if new_node is not None:
node = new_node node = new_node
......
...@@ -836,7 +836,7 @@ class Op(utils.object2, PureOp, CLinkerOp): ...@@ -836,7 +836,7 @@ class Op(utils.object2, PureOp, CLinkerOp):
else: else:
return NotImplemented return NotImplemented
def prepare_node(self, node): def prepare_node(self, node, storage_map, compute_map):
""" """
Make any special modifications that the Op needs before doing Make any special modifications that the Op needs before doing
make_thunk(). make_thunk().
...@@ -959,7 +959,8 @@ class Op(utils.object2, PureOp, CLinkerOp): ...@@ -959,7 +959,8 @@ class Op(utils.object2, PureOp, CLinkerOp):
""" """
logger = logging.getLogger('theano.gof.op.Op') logger = logging.getLogger('theano.gof.op.Op')
new_node = self.prepare_node(node) new_node = self.prepare_node(node, storage_map=storage_map,
compute_map=compute_map)
if new_node is not None: if new_node is not None:
node = new_node node = new_node
...@@ -1218,7 +1219,8 @@ int main( int argc, const char* argv[] ) ...@@ -1218,7 +1219,8 @@ int main( int argc, const char* argv[] )
self.openmp = False self.openmp = False
theano.config.openmp = False theano.config.openmp = False
def prepare_node(self, node): def prepare_node(self, node, storage_map,
compute_map):
self.update_self_openmp() self.update_self_openmp()
......
...@@ -1953,7 +1953,7 @@ class GpuConv(GpuOp): ...@@ -1953,7 +1953,7 @@ class GpuConv(GpuOp):
images[2] * images[3] * 2) images[2] * images[3] * 2)
return flops return flops
def prepare_node(self, node): def prepare_node(self, node, storage_map, compute_map):
if node.op.max_threads_dim0 is None: if node.op.max_threads_dim0 is None:
cuda = theano.sandbox.cuda cuda = theano.sandbox.cuda
device_id = cuda.use.device_number device_id = cuda.use.device_number
......
差异被折叠。
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论