Skip to content

Commit

Permalink
[Unity][SLM] GPU sampling (#16575)
Browse files Browse the repository at this point in the history
This PR adds GPU sampling support to SLM
  • Loading branch information
yongwww authored Feb 23, 2024
1 parent faa6628 commit 84b3f69
Show file tree
Hide file tree
Showing 5 changed files with 973 additions and 3 deletions.
16 changes: 16 additions & 0 deletions python/tvm/relax/frontend/nn/_tensor_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,22 @@ def __truediv__(self, other):
other = _convert_scalar(other, self)
return _op().divide(self, other)

def __lt__(self, other):
other = _convert_scalar(other, self)
return _op().less(self, other)

def __le__(self, other):
other = _convert_scalar(other, self)
return _op().less_equal(self, other)

def __gt__(self, other):
other = _convert_scalar(other, self)
return _op().greater(self, other)

def __ge__(self, other):
other = _convert_scalar(other, self)
return _op().greater_equal(self, other)

def astype(self, dtype):
return _op().astype(self, dtype)

Expand Down
Loading

0 comments on commit 84b3f69

Please sign in to comment.