Ops.ALU is no more, the arg is just an op (#7525)

* op arg alu [pr]

* more

* more passing

* fix more tests

* more tests passing

* fix single failing test

* so much cleaner

* noop to not have process replay trigger

* fix ptx
This commit is contained in:
George Hotz
2024-11-05 00:22:22 +08:00
committed by GitHub
parent 36488a2a43
commit 99bd4372a5
22 changed files with 171 additions and 185 deletions

View File

@@ -620,21 +620,21 @@ class TestMultiTensor(unittest.TestCase):
for si in t.schedule():
ast = si.ast.src[0]
assert ast.op is Ops.STORE
assert ast.src[2].arg is BinaryOps.ADD
assert ast.src[2].op is BinaryOps.ADD
assert ast.src[2].src[0].op is Ops.LOAD
assert ast.src[2].src[1].src[1].op is Ops.CONST and ast.src[2].src[1].src[1].arg == 1
t = 2 * t
for si in t.schedule():
ast = si.ast.src[0]
assert ast.op is Ops.STORE
assert ast.src[2].arg is BinaryOps.MUL
assert ast.src[2].op is BinaryOps.MUL
assert ast.src[2].src[0].src[1].op is Ops.CONST and ast.src[2].src[0].src[1].arg == 2
assert ast.src[2].src[1].op is Ops.LOAD
t = t + t.full_like(3)
for si in t.schedule():
ast = si.ast.src[0]
assert ast.op is Ops.STORE
assert ast.src[2].arg is BinaryOps.ADD
assert ast.src[2].op is BinaryOps.ADD
assert ast.src[2].src[0].op is Ops.LOAD
assert ast.src[2].src[1].src[1].op is Ops.CONST and ast.src[2].src[1].src[1].arg == 3