Libtorch dll versioning #69072
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
馃殌 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
The text was updated successfully, but these errors were encountered: