Skip to content

Commit 834067d

Browse files
authored
move onnx import in compile3 (tinygrad#13172)
only used in test_vs_onnx
1 parent 7f3240d commit 834067d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/openpilot/compile3.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
from tinygrad import fetch, Tensor, TinyJit, Context, GlobalCounters, Device, dtypes
55
from tinygrad.helpers import DEBUG, getenv
66
from tinygrad.engine.realize import CompiledRunner
7-
8-
import onnx
97
from tinygrad.nn.onnx import OnnxRunner
108

119
OPENPILOT_MODEL = sys.argv[1] if len(sys.argv) > 1 else "https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx"
@@ -96,6 +94,7 @@ def test_vs_compile(run, inputs, test_val=None):
9694
return val
9795

9896
def test_vs_onnx(new_inputs, test_val, onnx_file, tol):
97+
import onnx
9998
import onnxruntime as ort
10099

101100
onnx_inputs = {k:v.numpy() for k,v in new_inputs.items()}

0 commit comments

Comments
 (0)