Skip to content

Commit

Permalink
[dicp][ascend] rename add/adds in ascend op (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
tangzhiyi11 authored Jan 8, 2024
1 parent cc6434f commit 3ecb00b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dicp/dicp/vendor/AscendGraph/ascend_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ def negative_in_shape(shape):

class Adds(Operator):
def __init__(self):
super().__init__("adds")
super().__init__("Adds")

def infer_result(self, x1, x2):
return common_binary_op_infer(x1, x2)


class Add(Operator):
def __init__(self):
super().__init__("add")
super().__init__("Add")

def infer_result(self, x1, x2):
return common_binary_op_infer(x1, x2)
Expand Down
10 changes: 2 additions & 8 deletions dicp/dicp/vendor/AscendGraph/codegen/ascend.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,14 +729,14 @@ def IdentityN(name, *args, **kwargs):
return id_op.to_node()

@staticmethod
def adds(name, x, y):
def Adds(name, x, y):
adds_op = OP(name, "Adds")
adds_op.set_input("x", x)
adds_op.set_attr_float("value", float(y))
return adds_op.to_node()

@staticmethod
def add(name, x, y):
def Add(name, x, y):
add_op = OP(name, "Add")
add_op.set_input("x1", x)
add_op.set_input("x2", y)
Expand Down Expand Up @@ -769,12 +769,6 @@ def Transpose(name, input, perm):
transpose_op.set_input("perm", perm)
return transpose_op.to_node()

@staticmethod
def reciprocal(name, x):
op = OP(name, "Reciprocal")
op.set_input("x", x)
return op.to_node()

@staticmethod
def Sqrt(name, x):
op = OP(name, "Sqrt")
Expand Down

0 comments on commit 3ecb00b

Please sign in to comment.