Skip to content

Commit

Permalink
update test_scalar_tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
tangzhiyi11 committed Jan 26, 2024
1 parent 36fa361 commit 61d06f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dicp/dicp/vendor/AscendGraph/codegen/ascend.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def __init__(self, graph, aten_graph=None, folder=None, graph_key=None):

self.folder = folder
self.graph_key = graph_key

aten_graph.print_readable()
graph.print_readable()

self.sym_to_inputs = {}
self.sym_in_args = {}
Expand Down
3 changes: 2 additions & 1 deletion dicp/test/op/test_scalar_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def forward(self, a, redundant_input, dtype):
# To solve this problem, an additional redundant input is added,
# and the result of an addition operator is returned.
res_default = torch.ops.aten.scalar_tensor.default(a, dtype=dtype)
return res_default + redundant_input, res_default
redundant_output = torch.ops.aten.add.Tensor(redundant_input, res_default)
return redundant_output, res_default


model = OpModule()
Expand Down

0 comments on commit 61d06f5

Please sign in to comment.