Compare commits

...
1 Commits
Author SHA1 Message Date
sirhcm 56189c1ec4 onnxruntime respects NUM_CPU_THREADS
Platform Tests / MacOS (unit) (pull_request) Waiting to run
Platform Tests / MacOS (unit, mock) (pull_request) Waiting to run
Platform Tests / MacOS (DEV=METAL) (1) (pull_request) Waiting to run
Platform Tests / MacOS (DEV=METAL) (2) (pull_request) Waiting to run
Platform Tests / MacOS (DEV=CPU:CLANG) (pull_request) Waiting to run
Platform Tests / MacOS (DEV=CPU:LLVM) (pull_request) Waiting to run
Platform Tests / MacOS (DEV=CPU:LVP) (pull_request) Waiting to run
Platform Tests / MacOS (DEV=WEBGPU) (pull_request) Waiting to run
Platform Tests / Windows (DEV=CPU:CLANG) (pull_request) Waiting to run
Platform Tests / Windows (DEV=CPU:LLVM) (pull_request) Waiting to run
Platform Tests / Windows (DEV=CPU:X86) (pull_request) Waiting to run
Platform Tests / Windows (DEV=WEBGPU) (pull_request) Waiting to run
Unit Tests / Linters (pull_request) Successful in 2m0s
Unit Tests / Models (pull_request) Successful in 1m30s
Unit Tests / ONNX (CPU) Tests (pull_request) Successful in 1m51s
Unit Tests / Linux (DSP) (pull_request) Successful in 1m41s
Unit Tests / Docs (pull_request) Successful in 2m57s
Unit Tests / Test LLM (pull_request) Successful in 1m56s
Unit Tests / Fuzzing (pull_request) Successful in 2m25s
Unit Tests / Torch Backend Training (pull_request) Successful in 3m21s
Unit Tests / Null Tests (pull_request) Successful in 3m16s
Unit Tests / Python Backend (pull_request) Successful in 3m20s
Unit Tests / Unit Tests (pull_request) Successful in 3m22s
Check Line Counts / Check PR Branch status (pull_request_target) Successful in 14s
Unit Tests / openpilot Compile Tests (pull_request) Successful in 3m2s
Unit Tests / CL IMAGE Tests (pull_request) Successful in 3m12s
Unit Tests / AMD ASM IDE (pull_request) Successful in 2m34s
Check Line Counts / Core Library Line Difference (pull_request_target) Skipped
Unit Tests / SPEC=2 (1) (pull_request) Successful in 4m6s
Unit Tests / hcq2 (pull_request) Successful in 2m39s
Unit Tests / Torch Backend Tests (pull_request) Successful in 4m24s
Unit Tests / Linux (DEV=CPU:X86) (pull_request) Successful in 3m17s
Unit Tests / SPEC=2 (2) (pull_request) Successful in 3m54s
Unit Tests / Linux (DEV=CPU:LVP) (pull_request) Successful in 3m31s
Unit Tests / Optimization Tests (pull_request) Successful in 3m57s
Unit Tests / Compile-only (DEV=NULL:NAK:sm_120) (pull_request) Successful in 1m41s
Unit Tests / Linux (DEV=CL) (pull_request) Successful in 3m44s
Unit Tests / Linux (DEV=CPU:LLVM) (pull_request) Successful in 3m37s
Unit Tests / Linux (DEV=WEBGPU) (pull_request) Successful in 3m51s
Unit Tests / Compile-only (DEV=NULL:IR3:a630) (pull_request) Successful in 2m20s
Unit Tests / Linux (DEV=CPU:CLANG) (pull_request) Successful in 4m22s
Unit Tests / Linux (amdllvm gfx1100) (pull_request) Successful in 3m27s
Unit Tests / Linux (am) (pull_request) Successful in 3m45s
Unit Tests / Linux (amdllvm gfx1201) (pull_request) Successful in 3m16s
Unit Tests / Linux (amd gfx1100) (pull_request) Successful in 3m48s
Unit Tests / Linux (amd gfx1201) (pull_request) Successful in 3m47s
Unit Tests / Linux (amdllvm gfx950) (pull_request) Successful in 3m13s
Unit Tests / Linux (ptx) (pull_request) Successful in 3m7s
Unit Tests / Linux (nv) (pull_request) Successful in 3m51s
Unit Tests / Linux (amd gfx950) (pull_request) Successful in 4m20s
Unit Tests / Compile-only (DEV=NULL:QCOMCL:a630) (pull_request) Successful in 3m48s
2026-08-27 16:41:08 -07:00
+2
View File
@@ -1,10 +1,12 @@
from tinygrad import Tensor
from tinygrad.helpers import NUM_CPU_THREADS
from tinygrad.tensor import _to_np_dtype
from tinygrad.nn.onnx import OnnxRunner, OnnxValue
import numpy as np
import onnxruntime as ort
ort_options = ort.SessionOptions()
ort_options.log_severity_level = 3
ort_options.intra_op_num_threads = NUM_CPU_THREADS.value
def get_example_inputs(graph_inputs:dict[str, OnnxValue], config={}):
"""