Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onnxruntime_perf_test.exe failing starting v1.18.0 if the model path doesn't contain any path separator #21267

Closed
saurabhtangri opened this issue Jul 5, 2024 · 9 comments · Fixed by #21341
Assignees
Labels
core runtime issues related to core runtime

Comments

@saurabhtangri
Copy link
Contributor

Describe the issue

C:\dev\ort-src\onnxruntime-v1.18.0\build\Windows\RelWithDebInfo\RelWithDebInfo>onnxruntime_perf_test.exe -e cpu -I -m times -r 1000 simplified_ssd.onnx
C:\dev\ort-src\onnxruntime-v1.18.0\onnxruntime\test\onnx\TestCase.cc:705 OnnxTestCase::OnnxTestCase test case dir doesn't exist

To reproduce

Build ONNXRT for windows and run onnxruntime_perf_test

Urgency

Showstopper

Platform

Windows

OS Version

Win11

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

v1.18.0

ONNX Runtime API

Python

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Jul 5, 2024
@snnn snnn self-assigned this Jul 8, 2024
@snnn
Copy link
Member

snnn commented Jul 8, 2024

The latest code should work fine.
image

@snnn snnn added more info needed issues that cannot be triaged until more information is submitted by the original user and removed platform:windows issues related to the Windows platform labels Jul 8, 2024
@saurabhtangri
Copy link
Contributor Author

saurabhtangri commented Jul 9, 2024

I had tried with 1.18.1 tag which behaved the same as 1.18.0 as below.

C:\dev\ort-src\onnxruntime-v1.18.0\build\Windows\RelWithDebInfo\RelWithDebInfo>onnxruntime_perf_test.exe -e cpu -I -m times -r 1000 simplified_ssd.onnx
C:\dev\ort-src\onnxruntime-v1.18.0\onnxruntime\test\onnx\TestCase.cc:705 OnnxTestCase::OnnxTestCase test case dir doesn't exist

C:\dev\ort-src\onnxruntime-v1.18.0\build\Windows\RelWithDebInfo\RelWithDebInfo>onnxruntime_perf_test.exe -t 10 simplified_ssd.onnx
C:\dev\ort-src\onnxruntime-v1.18.0\onnxruntime\test\onnx\TestCase.cc:705 OnnxTestCase::OnnxTestCase test case dir doesn't exist

C:\dev\ort-src\onnxruntime-v1.18.0\build\Windows\RelWithDebInfo\RelWithDebInfo>git status
HEAD detached at v1.18.0
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: ../../../../cmake/external/emsdk (new commits)
modified: ../../../../cmake/external/onnx (new commits)

no changes added to commit (use "git add" and/or "git commit -a")

==============================================================

C:\dev\ort-src\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo>onnxruntime_perf_test.exe -e cpu -I -m times -r 10 simplified_ssd.onnx
Session creation time cost: 0.0377832 s
First inference time cost: 63 ms
Total inference time cost: 0.146239 s
Total inference requests: 10
Average inference time cost: 14.6239 ms
Total inference run time: 0.147193 s
Number of inferences per second: 67.9381
Avg CPU usage: 99 %
Peak working set size: 245743616 bytes
Avg CPU usage:99
Peak working set size:245743616
Runs:10
Min Latency: 0.0129886 s
Max Latency: 0.0256459 s
P50 Latency: 0.013477 s
P90 Latency: 0.0256459 s
P95 Latency: 0.0256459 s
P99 Latency: 0.0256459 s
P999 Latency: 0.0256459 s

C:\dev\ort-src\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo>git status
HEAD detached at v1.17.1
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: ../../../../cmake/external/emsdk (new commits)
modified: ../../../../cmake/external/onnx (new commits)

no changes added to commit (use "git add" and/or "git commit -a")

@snnn
Copy link
Member

snnn commented Jul 9, 2024

Did you try the main branch? Does it work?

@mailkv23
Copy link

I have been seeing this issue for few weeks now. Its seen in main branch

@mailkv23
Copy link

I had tried with 1.18.1 tag which behaved the same as 1.18.0 as below.

C:\dev\ort-src\onnxruntime-v1.18.0\build\Windows\RelWithDebInfo\RelWithDebInfo>onnxruntime_perf_test.exe -e cpu -I -m times -r 1000 simplified_ssd.onnx C:\dev\ort-src\onnxruntime-v1.18.0\onnxruntime\test\onnx\TestCase.cc:705 OnnxTestCase::OnnxTestCase test case dir doesn't exist

C:\dev\ort-src\onnxruntime-v1.18.0\build\Windows\RelWithDebInfo\RelWithDebInfo>onnxruntime_perf_test.exe -t 10 simplified_ssd.onnx C:\dev\ort-src\onnxruntime-v1.18.0\onnxruntime\test\onnx\TestCase.cc:705 OnnxTestCase::OnnxTestCase test case dir doesn't exist

C:\dev\ort-src\onnxruntime-v1.18.0\build\Windows\RelWithDebInfo\RelWithDebInfo>git status HEAD detached at v1.18.0 Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: ../../../../cmake/external/emsdk (new commits) modified: ../../../../cmake/external/onnx (new commits)

no changes added to commit (use "git add" and/or "git commit -a")

==============================================================

C:\dev\ort-src\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo>onnxruntime_perf_test.exe -e cpu -I -m times -r 10 simplified_ssd.onnx Session creation time cost: 0.0377832 s First inference time cost: 63 ms Total inference time cost: 0.146239 s Total inference requests: 10 Average inference time cost: 14.6239 ms Total inference run time: 0.147193 s Number of inferences per second: 67.9381 Avg CPU usage: 99 % Peak working set size: 245743616 bytes Avg CPU usage:99 Peak working set size:245743616 Runs:10 Min Latency: 0.0129886 s Max Latency: 0.0256459 s P50 Latency: 0.013477 s P90 Latency: 0.0256459 s P95 Latency: 0.0256459 s P99 Latency: 0.0256459 s P999 Latency: 0.0256459 s

C:\dev\ort-src\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo>git status HEAD detached at v1.17.1 Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: ../../../../cmake/external/emsdk (new commits) modified: ../../../../cmake/external/onnx (new commits)

no changes added to commit (use "git add" and/or "git commit -a")

Try providing full path to the onnx model

@snnn
Copy link
Member

snnn commented Jul 10, 2024

I see. Now I can reproduce the issue.

@virajwad
Copy link

Seeing the same issue!

@snnn snnn added core runtime issues related to core runtime and removed more info needed issues that cannot be triaged until more information is submitted by the original user labels Jul 12, 2024
snnn added a commit that referenced this issue Jul 15, 2024
### Description
Resolve #21267 . onnxruntime_perf_test does not work properly if the
input model path url is just a single filename without any path
separator. For example,

```
./onnxruntime_perf_test -t 10 model.onnx
```

The problem was introduced in #19196 by me.
@snnn
Copy link
Member

snnn commented Jul 15, 2024

Thanks for reporting the issue. The fix will be included in the next release.

@snnn snnn changed the title onnxruntime_perf_test.exe failing starting v1.18.0 onnxruntime_perf_test.exe failing starting v1.18.0 if the model path doesn't contain any path separator Jul 15, 2024
@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Jul 15, 2024
@snnn
Copy link
Member

snnn commented Jul 15, 2024

While waiting the release, you may use an absolute path instead.

@snnn snnn removed the platform:windows issues related to the Windows platform label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core runtime issues related to core runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants