question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This application or script uses TorchSharp but doesn't contain a reference to libtorch-cpu-11.3-win-x64, Version=1.11.0.1

See original GitHub issue

Having some trouble using Torchsharp in a C# .Net 4.8 project. I’d show you some source code but this is as far as i’ve gotten:

TryInitializeDeviceType(TorchSharp.DeviceType.CPU); Replacing this code with any other code from Torchsharp-library creates the same result and error.

I’m using the Torchsharp-cpu nuget package, and I’ve tried using Torchsharp with the libtorch-cpu-11.3-win-x64 package and its dependencies as well without any luck.

My packages.config includes these: <package id="libtorch-cpu" version="1.13.0.1" targetFramework="net48" /> <package id="libtorch-cpu-linux-x64" version="1.13.0.1" targetFramework="net48" /> <package id="libtorch-cpu-osx-x64" version="1.13.0.1" targetFramework="net48" /> <package id="libtorch-cpu-win-x64" version="1.13.0.1" targetFramework="net48" /> And I’ve tried using the exact 1.11.0 version with no luck as well.

Not really sure how to proceed to make it work here.

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:36 (32 by maintainers)

github_iconTop GitHub Comments

2reactions
NiklasGustafssoncommented, Feb 15, 2023

For now, I’m going to add a runtime check that we’re running in 64-bit mode before trying to load DLLs. That should at least help by generating a more directly understandable error message. Still won’t address the core issue.

1reaction
mfagerlundcommented, Feb 15, 2023

These steps I already tried but I love to hear if this worked for all you.

This worked in my test project!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found