Added the Pytorch/numpy typed remainder and floor divide for integers. The summarized procedure for the Triton Pytorch conversion for floordiv is:
def floordiv(x, y):
if x % y != 0 and x < 0 ^ y < 0:
return x // y - 1
else:
return x // y
def _remainder(x, y):
if x % y != 0 and x < 0 ^ y < 0:
return r + y
else:
return r
Issue
Progress
[x] Change is properly reviewed (1 reviewer required, 2 recommended).
PR Category
Op
Type of Change
Bug Fix and new feature
Description
Added the Pytorch/numpy typed remainder and floor divide for integers. The summarized procedure for the Triton Pytorch conversion for floordiv is:
Issue
Progress
Performance
Performance for bs=1024 on A100: