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

[ort-sys] Support explicit dynamic linking of onnxruntime #295

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

bradneuman
Copy link
Contributor

Previously, if static library files were found, the build script in ort-sys would always prefer static linking.

This PR introduces a new env variable, ORT_PREFER_DYNAMIC_LINK, that can be set (to 1 or "true") to use dynamic linking even if the static library files are present in the onnxruntime path.

Additionally, since cuda and tensorrt require dynamic linking, static linking is disabled when these features are present.

Previously, if static library files were found, the build script in ort-sys
would always prefer static linking.

This PR introduces a new env variable, ORT_PREFER_DYNAMIC_LINK, that can be
set (to 1 or "true") to use dynamic linking even if the static library files are
present in the onnxruntime path.

Additionally, since cuda and tensorrt require dynamic linking, static linking is
disabled when these features are present.
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.18%. Comparing base (c882c58) to head (fbcfeca).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #295   +/-   ##
=======================================
  Coverage   53.18%   53.18%           
=======================================
  Files          34       34           
  Lines        2326     2326           
=======================================
  Hits         1237     1237           
  Misses       1089     1089           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@decahedron1 decahedron1 merged commit ae7b594 into pykeio:main Oct 11, 2024
7 of 8 checks passed
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.

2 participants