fix all bugs

This commit is contained in:
2025-04-02 11:07:32 +08:00
parent a59b1ed970
commit dd51728795
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ if __name__ == "__main__":
GlobalCounters.reset()
p = run_onnx_jit(**{t_name:img})
assert p.shape == (1,1000)
t = p.argmax().item()
t = p.to('cpu').argmax().item()
hit += y==t
print(f"target: {y:3d} pred: {t:3d} acc: {hit/(i+1)*100:.2f}%")
+1
View File
@@ -318,6 +318,7 @@ def vectorize_shuffle(vec:UOp):
return None
def multicore_range(r:UOp):
# NOTE: THIS IS BROKEN if this is a reduce range. TODO: check for that
if getenv("MULTICORE", 0) != 1: return None
if any(x.op is Ops.SPECIAL for x in r.toposort): return None
core = UOp(Ops.SPECIAL, dtypes.int, arg=("g0", 2))