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

Rework the native library usage so that a pre-built ORT native package can be easily used #22345

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

skottmckay
Copy link
Contributor

Description

The local build of the native library was being included by almost every project, but is only needed to run tests. Due to the multiple inclusions attempting to use a pre-built package was clashing with any local builds that were available.

Create a helper file to include either a local built of a pre-built package and include that in the two test projects.

Cleanup various miscellaous things.

Motivation and Context

Create setup to simplify running on-device tests with the nuget packages.

…e can be easily used. The same native libraries were being included by almost every project, but the native library is only needed to run tests. Due to the multiple inclusions attempting to use a pre-built package was clashing with any local builds that were available.

Create a helper file to include either a local built of a pre-built package and include that in the two test projects.

Cleanup various miscellaous things.
@@ -64,13 +64,6 @@ CMake creates a target to this project
<Error Text="Building via this file is not supported. Please build using the appropriate .sln file in this directory." />
</Target>

<Target Name="RunTest">
<Message Importance="High" Text="Running CSharp tests..." />
<Exec Command="$(DotNetExe) test test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj -c $(Configuration) --no-build --blame -v n" ConsoleToMSBuild="true">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project doesn't exist anymore so nothing is using this target.

<Message Text="OrtConstants='$(OrtConstants)' " />
<Message Text="TargetFrameworks='$(TargetFrameworks)' " />
</Target>

<ItemGroup>
<None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\session\onnxruntime_*.h"
PackagePath="\build\native\include"
Pack="false"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear if any of these are needed given they're excluded from being packed into the managed nuget package, and \tools\nuget\generate_nuspec_for_native_nuget.py takes care of everything that goes into the native package.

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

Successfully merging this pull request may close these issues.

1 participant