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

TestOnnx Win32 throws 0xC0000005 exception #39

Closed
theoractice opened this issue Aug 3, 2024 · 4 comments
Closed

TestOnnx Win32 throws 0xC0000005 exception #39

theoractice opened this issue Aug 3, 2024 · 4 comments

Comments

@theoractice
Copy link

theoractice commented Aug 3, 2024

Testing on Win10 x64 system.

I could not build latest code, So I used Simd v6.1.139 and commit c995873 (the one just before Simd v6.1.139 was released).

x64 binary worked like a charm (I had already converted other.onnx to Synet format under Linux).

⠕ TestOnnx.exe -m=compare
Start  and Synet(fp32) single-thread comparison tests :
Tests are finished successfully!

Synet(fp32) memory usage: 31.4 MB.
----- Performance Report -----
Simd Library: 6.1.139; CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz; System Sockets: 1, Cores: 6, Threads: 12; Cache L1D: 32 KB, L2: 256 KB, L3: 12288 KB, RAM: 32605 MB; Available SIMD: AVX2 FMA AVX SSE4.1 SSSE3 SSE3 SSE2 SSE
Test::SynetNetwork::Init{ fp32 }: 21 ms / 1 = 20.598 ms {min = 20.598; max = 20.598}
Test::SynetNetwork::Predict{ fp32 }: 110 ms / 10 = 10.971 ms {min = 10.732; max = 11.125} 72.8 GFlops

But Win32 binary gave me a 0xC0000005 exception here:
image

@theoractice theoractice changed the title TestOnnx Win32 build failed TestOnnx Win32 throws 0xC0000005 exception Aug 3, 2024
@ermig1979
Copy link
Owner

Hi! Excuse me for so late answer - I was at vacation. I try to reproduce this bug but TestOnnx works fine in Win32 mode. So I need more information to reproduce and fix this bug.

@theoractice
Copy link
Author

theoractice commented Aug 22, 2024

Thanks for your kind reply. Here are the steps to reproduce the issue:

  • Install VS2022 latest version on a Win10 x64 system.

  • git clone the Synet repo, then revert to commit c995873.

  • Download Simd v6.1.139 and unzip to Synet\3rd folder. I did the above because the latest Synet VS2022 solution just won't compile.

  • Define SIMD_STATIC: Uncomment the SIMD_STATIC line in Simd/SimdConfig.h, then insert one line: #include "Simd/SimdConfig.h" to TestOnnx.cpp before line 28: #include "TestCompare.h". I did this because TestOnnx was configured to /MT by default and it won't compile without SIMD_STATIC defined.

  • Copy the model files to Synet\prj\vs2022 in order to let VS2022 find them when debugging. The Synet model files are converted from onnx model files under Synet\data\onnx\test_001 and has been tested to work with TestOnnx x64 binary under linux x64 and Win10 x64 respectively. The model files are uploaded here just in case:
    Synet.zip

  • Compile TestOnnx with Release/Win32 mode and run.

Files under Synet\data\onnx\test_000 failed to load, either. I can see that those model files hasn't been changed for a while, so I have no idea.

@ermig1979
Copy link
Owner

ermig1979 commented Aug 22, 2024

I compiled TestOnnx on Release/Win32 with static Simd. And it works fine.
P.S. Sorry I checked latest commit. Is this critical - to fix bug in that specific commit?

@theoractice
Copy link
Author

Is this critical - to fix bug in that specific commit?

Of course not. I was just trying to repeat exactly what I did when I encountered the bug.
Now I have updated to the latest source code and everything is fine. Guess I was running out of luck then.
Issue closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants