From c55c6dc7afddf375bd5b0d0b615dfe7fb37549c1 Mon Sep 17 00:00:00 2001 From: Jeremy Fowers <80718789+jeremyfowers@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:00:42 -0500 Subject: [PATCH] Upload a new example onnx file and fix the test and tutorial (#45) * Upload a new example onnx file and fix the tutorial Signed-off-by: Jeremy Fowers * Re-enable the ONNX example test Signed-off-by: Jeremy Fowers --------- Signed-off-by: Jeremy Fowers --- .github/workflows/test_turnkey.yml | 3 +-- examples/cli/onnx/hello_world.onnx | Bin 0 -> 466 bytes examples/cli/onnx/sample.onnx | 3 --- examples/cli/readme.md | 24 +++++++++++------------- 4 files changed, 12 insertions(+), 18 deletions(-) create mode 100644 examples/cli/onnx/hello_world.onnx delete mode 100644 examples/cli/onnx/sample.onnx diff --git a/.github/workflows/test_turnkey.yml b/.github/workflows/test_turnkey.yml index ac4712c3..85497367 100644 --- a/.github/workflows/test_turnkey.yml +++ b/.github/workflows/test_turnkey.yml @@ -65,8 +65,7 @@ jobs: rm -rf ~/.cache/turnkey turnkey examples/cli/scripts/two_models.py rm -rf ~/.cache/turnkey - # TODO: sample.onnx test is commented because it throws an error in CI - # turnkey examples/cli/onnx/sample.onnx + turnkey examples/cli/onnx/hello_world.onnx # E2E tests cd test/ diff --git a/examples/cli/onnx/hello_world.onnx b/examples/cli/onnx/hello_world.onnx new file mode 100644 index 0000000000000000000000000000000000000000..fb7d878179dbb3467768bf0e4d10afb256e1070a GIT binary patch literal 466 zcmd;J7h*4{EXglQ&X8g?(lgLAwA#tcWy8f-!Nr%KmseqB<(pXITbdJZCM2w%maGru z<(HNel$OLBNO2(qmDnJXT>4z>X~}v?nTf?**z^c7no6;Qv^l1vC@}*GAx^OU@mZNA zTFM-(0*p>D{azycwdHmb{nGc8iu&ziV6m~gzhu9y)>lRjZm>EuCwkps6c>}XE8kRX z^OeDW@1x~C`$Cp0?Q?PC*mt?@q3sJD)_p6FPuiEgSiUHC6HNJCZqN-#H;!yR)C#?3B~&?FuTV z+jW`UK-b#rL*-eY$r+-Xy!3o#}QllGFA+a9M4; wx58@Qu2bH2PJc74Cm)_^7sU^Z79lP!4h}{k7A__Z?j)dqDUtxI6O#ZR09YTX)Bpeg literal 0 HcmV?d00001 diff --git a/examples/cli/onnx/sample.onnx b/examples/cli/onnx/sample.onnx deleted file mode 100644 index fd3676d3..00000000 --- a/examples/cli/onnx/sample.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:83fa7cc9761867250a047c13fcb65d83289382ad16b42ac2f2915774234a7afb -size 572 diff --git a/examples/cli/readme.md b/examples/cli/readme.md index 3787a86b..a181b3c6 100644 --- a/examples/cli/readme.md +++ b/examples/cli/readme.md @@ -214,28 +214,26 @@ multiple_invocations.py: ## ONNX Benchmarking -If you already happen to have an ONNX file, `turnkey` can benchmark it for you. We can demonstrate this with the ONNX file in `examples/cli/onnx/sample.onnx`. +If you already happen to have an ONNX file, `turnkey` can benchmark it for you. We can demonstrate this with the ONNX file in `examples/cli/onnx/hello_world.onnx`. Run the following command: ``` -turnkey onnx/sample.onnx +turnkey onnx/hello_world.onnx ``` To get a result like: ``` -Building "sample" - ✓ Receiving ONNX Model - ✓ Finishing up - -Woohoo! Saved to ~/turnkeyml/examples/cli/onnx/tmp_cache/sample - -Info: Benchmarking on local x86... - -Info: Performance of build sample on x86 device Intel(R) Xeon(R) CPU @ 2.20GHz is: - Mean Latency: 0.042 milliseconds (ms) - Throughput: 23921.9 inferences per second (IPS) +hello_world.onnx: + Model Type: ONNX File (.onnx) + Parameters: 60 (240.0 B) + Input Shape: 'x': (11,) + Hash: 17ecd07e + Build dir: /home/jfowers/.cache/turnkey/hello_world_17ecd07e + Status: Successfully benchmarked on AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (ort v1.15.1) + Mean Latency: 0.007 milliseconds (ms) + Throughput: 152240.4 inferences per second (IPS) ``` # Thanks!