Skip to content

Commit

Permalink
Modify call params.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdx1989 committed Nov 14, 2023
1 parent cf43da6 commit 9817b65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dicp/dicp/vendor/AscendGraph/codegen/ascend.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ def Identity(name, input, index):
return op.to_node()

@staticmethod
def IdentityInp(name, input, dst):
def IdentityInp(name, input, dst=None):
op = OP(name, "Identity")
op.set_input("x", input)
return op.to_node()
Expand Down Expand Up @@ -997,7 +997,7 @@ def Cast(name, x, ascend_dtype, device=None):


@staticmethod
def CastCpu(name, x, ascend_dtype, device='cpu'):
def CastCpu(name, x, ascend_dtype, device=None):
cast_op = OP(name, "Cast")
cast_op.set_input("x", x)
cast_op.set_attr_int("dst_type", get_ascend_dtype_num(ascend_dtype))
Expand Down
2 changes: 1 addition & 1 deletion dicp/dicp/vendor/AscendGraph/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ def copy_(self, dst, src):

@register_conversion(torch.ops.aten.copy)
def copy(self, dst, src):
return self.get_proxy(ascend_op.Identity, (src, None))
return self.get_proxy(ascend_op.IdentityInp, (src, dst))

@register_conversion(torch.ops.aten.unsqueeze)
def unsqueeze(self, x, dim):
Expand Down

0 comments on commit 9817b65

Please sign in to comment.