-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Build] Dotnet packages on nuget are not built with Release optimizations #23053
Comments
Microsoft.ML.OnnxRuntime contains native libraries (built from C and C++ code) that are built using the cmake 'RelWithDebInfo' config. That's a release build, but it doesn't throw away the symbols info to make debugging issues easier. AFAIK that does not prevent any optimizations from running. How is MLBenchmarks determining it's 'non-optimized' given the nuget package contains native libraries? |
Hello @skottmckay, MLBenchmarks is not determining if some dependency is "non-optimized" but BenchmarkDotNet.
It seems this is what it checks: It's not about the native library but about the dotnet assembly (just the wrapper). This is what it checks on the assembly: |
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
Commenting as this was marked as |
Describe the issue
I want to benchmark some application that is using OnnxRuntime in dotnet using BenchmarkDotNet but I receive the following error:
I see that you're using RelWithDebInfo:
onnxruntime/.pipelines/windowsai-steps.yml
Line 99 in 6d9636f
Any reason for having this non-standard behavior for the package in nuget.org?
Same issue is for all version (1.20.1, 1.20.0. etc)
Urgency
No blockers, also workaround exists.
Target platform
win-x64 (possibly others as well)
Build script
Just create a benchmark using
Microsoft.ML.OnnxRuntime
and the validator will stop the execution of the benchmark if not disabled.Error / output
Validating benchmarks:
* Assembly MLBenchmarks which defines benchmarks references non-optimized Microsoft.ML.OnnxRuntime
If you own this dependency, please, build it in RELEASE.
If you don't, you can disable this policy by using 'config.WithOptions(ConfigOptions.DisableOptimizationsValidator)'.
Visual Studio Version
No response
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: