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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libtorch dll versioning #69072

Open
spiegelball opened this issue Nov 30, 2021 · 2 comments
Open

Libtorch dll versioning #69072

spiegelball opened this issue Nov 30, 2021 · 2 comments
Labels
enhancement Not as big of a feature, but technically not a bug. Should be easy to fix module: binaries Anything related to official binaries that we release to users Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@spiegelball
Copy link

spiegelball commented Nov 30, 2021

馃殌 Feature

Build libraries like torch_cpu, c10, torch_cuda etc. with proper versioning, mode (cpu vs. gpu) and debug / release information in the name.

Motivation

Let's say I have two dll's, a.dll and b.dll. a.dll depends on libtorch 1.9 cpu version and b.dll depends on libtorch 1.10 cuda version. With the current naming scheme it's not possible to have an application load both a.dll and b.dll. After a.dll is loaded, e.g. c10.dll (cpu version, 1.9.) is already loaded so b.dll will be fed with a wrong version of c10.dll

Pitch

Libraries could be built in the format library_name_version_backend.dll. E.g., c10.dll in version 1.10 would become either c10_110_cpu.dll or c10_110_cuda.dll. This also implies, that torch_cpu_110_cpu.dll now depends on c10_110_cpu.dll.

Alternatives

Maybe side-by-side assemblies, however I haven't found a solution for the scenario described above yet.

Additional context

cc @ezyang @seemethere @malfet

@samdow samdow added enhancement Not as big of a feature, but technically not a bug. Should be easy to fix module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Nov 30, 2021
@malfet malfet added module: binaries Anything related to official binaries that we release to users and removed module: build Build system issues labels Nov 30, 2021
@malfet
Copy link
Contributor

malfet commented Nov 30, 2021

Just adding extra suffixes to libraries would not solve side-by-side loading, as there would be numerous symbol clashes.

@spiegelball
Copy link
Author

Would all libraries built by pytorch need correct manifests for Sxs loading then? What could be a solution?

@github-actions github-actions bot added the Stale label Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Not as big of a feature, but technically not a bug. Should be easy to fix module: binaries Anything related to official binaries that we release to users Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants