From dd51728795bfcd90a8716c4f9da69662176422e2 Mon Sep 17 00:00:00 2001 From: George Hotz Date: Wed, 2 Apr 2025 11:07:32 +0800 Subject: [PATCH] fix all bugs --- examples/test_onnx_imagenet.py | 2 +- tinygrad/runtime/ops_dsp.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/test_onnx_imagenet.py b/examples/test_onnx_imagenet.py index af125f84d2..1c35e29f6a 100644 --- a/examples/test_onnx_imagenet.py +++ b/examples/test_onnx_imagenet.py @@ -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}%") diff --git a/tinygrad/runtime/ops_dsp.py b/tinygrad/runtime/ops_dsp.py index e22d1a73a3..6ef9ca7232 100644 --- a/tinygrad/runtime/ops_dsp.py +++ b/tinygrad/runtime/ops_dsp.py @@ -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))