Skip to content

Commit 42d5885

Browse files
committed
update template
1 parent 7702ca5 commit 42d5885

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

utensor_cgen/backend/utensor/snippets/rearch/_snippets.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ def __init__(self, op_info, tensor_var_map):
243243
quant_params = self.get_quant_param(out_tensor)
244244
quant_params_map[out_tensor.name] = quant_params
245245
self.template_vars['op_type'] = op_info.op_type
246+
self.template_vars['input_var_names'] = [
247+
tensor_var_map[tensor.name] for tensor in op_info.input_tensors
248+
]
246249
self.template_vars['input_tensors'] = op_info.input_tensors[:]
247250
self.template_vars['out_var_names'] = [
248251
tensor_var_map[tensor.name] for tensor in op_info.output_tensors

utensor_cgen/backend/utensor/snippets/templates/snippets/rearch/op_missing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
FIXME: {{op_type}} currently not supported, you have to fill up this section or it won't compile
33
44
Input Tensors:
5-
{%for tensor in input_tensors%}
6-
- {{tensor.name}}, of type {{tensor.dtype}}
5+
{%for tensor, var_name in zip(input_tensors, input_var_names)%}
6+
- {{tensor.name}}, of type {{tensor.dtype}} and is named as {{var_name}} in this file
77
{%endfor%}
88
99
Output Tensors:

0 commit comments

Comments
 (0)