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

Merged
merged 3 commits into from
Nov 1, 2024

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.
Copy link
Member

@snnn snnn left a comment

Choose a reason for hiding this comment

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

By coincidence your this PR fixed another problem I am investigating: when running the tests in csharp\test\Microsoft.ML.OnnxRuntime.Tests.Common\InferenceTest.cs when DML is enabled, actually we are using the operating system's DirectML.dll which is very old. We should use the one downloaded during our build.

@snnn
Copy link
Member

snnn commented Nov 1, 2024

Thanks for your fix. I will merge your PR now to unblock the engineering system team's DML integration work.

@snnn snnn merged commit ba0bb43 into main Nov 1, 2024
130 of 135 checks passed
@snnn snnn deleted the skottmckay/ReworkCSharpNativeLibUsage_PR branch November 1, 2024 18:03
mszhanyi pushed a commit that referenced this pull request Nov 6, 2024
…e package can be easily used (#22345)"

This reverts commit ba0bb43.
yf711 pushed a commit that referenced this pull request Nov 8, 2024
…e can be easily used (#22345)

### 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.
@sophies927 sophies927 added the triage:approved Approved for cherrypicks for release label Nov 11, 2024
yf711 pushed a commit that referenced this pull request Nov 11, 2024
…e can be easily used (#22345)

### 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.
@sophies927 sophies927 added the cherry-picked Cherry-picked for a cherrypicks branch label Nov 18, 2024
ishwar-raut1 pushed a commit to ishwar-raut1/onnxruntime that referenced this pull request Nov 19, 2024
…e can be easily used (microsoft#22345)

### 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.
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
…e can be easily used (microsoft#22345)

### 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.
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
…e can be easily used (microsoft#22345)

### 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked Cherry-picked for a cherrypicks branch release:1.20.1 triage:approved Approved for cherrypicks for release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants