提交 ff4c9050 authored 作者: carriepl's avatar carriepl

Perform static analysis on Scan's inner_function to determine location of inputs and outputs

上级 80197cf5
...@@ -858,6 +858,13 @@ class Scan(PureOp): ...@@ -858,6 +858,13 @@ class Scan(PureOp):
profile=profile, profile=profile,
on_unused_input='ignore') on_unused_input='ignore')
# Analyse the compile inner function to determine which inputs and
# outputs are on the gpu and speed up some checks during the execution
self.inps_on_gpu = [not isinstance(out, theano.tensor.TensorVariable)
for out in self.fn.maker.fgraph.inputs]
self.outs_on_gpu = [not isinstance(out, theano.tensor.TensorVariable)
for out in self.fn.maker.fgraph.outputs]
try: try:
cython_mintaps = numpy.asarray(self.mintaps, dtype='int32') cython_mintaps = numpy.asarray(self.mintaps, dtype='int32')
cython_tap_array_len = \ cython_tap_array_len = \
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论