提交 06e92b2a authored 作者: Frederic Bastien's avatar Frederic Bastien

bypass some add stack trace

上级 3073069a
...@@ -132,9 +132,9 @@ class NaiveAlgo(object): ...@@ -132,9 +132,9 @@ class NaiveAlgo(object):
#TODO: What if the scalar_op needs support_code?? #TODO: What if the scalar_op needs support_code??
task_code = self.scalar_op.c_code( task_code = self.scalar_op.c_code(
Apply(self.scalar_op, Apply(self.scalar_op,
[scalar.Scalar(dtype=input.type.dtype)() [scalar.Scalar(dtype=input.type.dtype).make_variable()
for input in node.inputs], for input in node.inputs],
[scalar.Scalar(dtype=output.type.dtype)() [scalar.Scalar(dtype=output.type.dtype).make_variable()
for output in node.outputs]), for output in node.outputs]),
nodename + '_scalar_', nodename + '_scalar_',
get_str_list_logical_scalar(node), get_str_list_logical_scalar(node),
...@@ -253,8 +253,10 @@ class NaiveAlgo(object): ...@@ -253,8 +253,10 @@ class NaiveAlgo(object):
#TODO: What if the scalar_op needs support_code?? #TODO: What if the scalar_op needs support_code??
task_code = self.scalar_op.c_code( task_code = self.scalar_op.c_code(
Apply(self.scalar_op, Apply(self.scalar_op,
[scalar.Scalar(dtype = input.type.dtype)() for input in node.inputs], [scalar.Scalar(dtype = input.type.dtype).make_variable()
[scalar.Scalar(dtype = output.type.dtype)() for output in node.outputs]) for input in node.inputs],
[scalar.Scalar(dtype = output.type.dtype).make_variable()
for output in node.outputs])
, nodename + '_scalar_' , nodename + '_scalar_'
, get_str_list_logical_scalar(node, value_str='value0[%i]') , get_str_list_logical_scalar(node, value_str='value0[%i]')
, ['ii_o%i_data[0]'%ipos for ipos, i in enumerate(node.outputs)] , ['ii_o%i_data[0]'%ipos for ipos, i in enumerate(node.outputs)]
...@@ -389,8 +391,10 @@ class NaiveAlgo(object): ...@@ -389,8 +391,10 @@ class NaiveAlgo(object):
def task_code(d): def task_code(d):
print >> sio, self.scalar_op.c_code( print >> sio, self.scalar_op.c_code(
Apply(self.scalar_op, Apply(self.scalar_op,
[scalar.Scalar(dtype = input.type.dtype)() for input in node.inputs], [scalar.Scalar(dtype = input.type.dtype).make_variable()
[scalar.Scalar(dtype = output.type.dtype)() for output in node.outputs]) for input in node.inputs],
[scalar.Scalar(dtype = output.type.dtype).make_variable()
for output in node.outputs])
, nodename + '_scalar_' , nodename + '_scalar_'
, ['i%i_data_%i[0]'%(ipos,d) for ipos, i in enumerate(node.inputs)] , ['i%i_data_%i[0]'%(ipos,d) for ipos, i in enumerate(node.inputs)]
, ['o%i_data_%i[0]'%(ipos,d) for ipos, i in enumerate(node.outputs)] , ['o%i_data_%i[0]'%(ipos,d) for ipos, i in enumerate(node.outputs)]
...@@ -461,8 +465,10 @@ class NaiveAlgo(object): ...@@ -461,8 +465,10 @@ class NaiveAlgo(object):
#TODO: What if the scalar_op needs support_code?? #TODO: What if the scalar_op needs support_code??
task_code = self.scalar_op.c_code( task_code = self.scalar_op.c_code(
Apply(self.scalar_op, Apply(self.scalar_op,
[scalar.Scalar(dtype = input.type.dtype)() for input in node.inputs], [scalar.Scalar(dtype = input.type.dtype).make_variable()
[scalar.Scalar(dtype = output.type.dtype)() for output in node.outputs]) for input in node.inputs],
[scalar.Scalar(dtype = output.type.dtype).make_variable()
for output in node.outputs])
, nodename + '_scalar_' , nodename + '_scalar_'
#, ['i%i_data[i]'%ipos for ipos, i in enumerate(node.inputs)] #, ['i%i_data[i]'%ipos for ipos, i in enumerate(node.inputs)]
, get_str_list_logical_scalar(node, data_str='i%i_data[i]') , get_str_list_logical_scalar(node, data_str='i%i_data[i]')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论