Skip to content

Commit

Permalink
clean up TensorProxy member methods related to in-place (#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
crcrpar authored Jul 12, 2024
1 parent 719b377 commit 723ee81
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions thunder/core/proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,9 +1410,6 @@ def __add__(self, other):
return method(self, other)

def __iadd__(self, other):
return self.add_(other)

def add_(self, other):
method = resolve_method("add_", self, other)
return method(self, other)

Expand Down Expand Up @@ -1453,9 +1450,6 @@ def __mul__(self, other):
return method(self, other)

def __imul__(self, other):
return self.mul_(other)

def mul_(self, other):
method = resolve_method("mul_", self, other)
return method(self, other)

Expand All @@ -1468,9 +1462,6 @@ def __pow__(self, other):
return method(self, other)

def __ipow__(self, other):
return self.pow_(other)

def pow_(self, other):
method = resolve_method("pow_", self, other)
return method(self, other)

Expand All @@ -1483,9 +1474,6 @@ def __sub__(self, other):
return method(self, other)

def __isub__(self, other):
return self.sub_(other)

def sub_(self, other):
method = resolve_method("sub_", self, other)
return method(self, other)

Expand All @@ -1502,10 +1490,7 @@ def __rtruediv__(self, other):
return method(other, self)

def __itruediv__(self, other):
return self.div_(other)

def div_(self, other, *, rounding_mode: str | None = None):
method = resolve_method("div_", self, other, rounding_mode=rounding_mode)
method = resolve_method("div_", self, other, rounding_mode=None)
return method(self, other)

#
Expand Down

0 comments on commit 723ee81

Please sign in to comment.