10BC0 Support Delay Loading of c10.dll in when using libtorch as a thirdparty library. · Issue #105058 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content
Support Delay Loading of c10.dll in when using libtorch as a thirdparty library. #105058
@kohillyang

Description

@kohillyang

🚀 The feature, motivation and pitch

Hi PyTorch team,

I'm currently working on a project where I have added libtorch as a third-party dependency. Due to the size of libtorch, I wanted to make it an optional dependency using delay load hooks. However, I've encountered an issue with c10.dll, which is a dependency of libtorch. It seems that c10.dll exports a global variable, causing it to be unable to be delay loaded.

Here's the error message I encountered
image

I'm wondering if it's possible to add support for delay loading c10.dll in libtorch. Having this feature would be really helpful for my project, as it will allow me to better manage the dependency loading and reduce the initial load time.

Alternatives

No response

Additional context

No response

cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @vladimir-aubrecht @iremyux @Blackhex @cristianPanaite

Metadata

Metadata

Assignees

Labels

module: abilibtorch C++ ABI related problemsmodule: windowsWindows support for PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0