Calls to NativeLibrary should not assume explicit paths

Open
#1,311 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp

Research direction

Open src/TorchSharp/Torch.cs at line 60 and compare the current NativeLibrary.TryLoad call with the linked full overload documentation. Verify how the overload preserves the OS-specific native library search strategy, then confirm the change builds and native library loading still works across supported deployments.

Written by the indexing model from the issue text.

Description

It seems extremely error-prone to presume to replace the OS-specific library search strategies. It doesn't feel like library developers should assume they have to rewrite how native libraries are found in the system. Application developers should worry about their specific deployments if this doesn't work for them.

This line:

https://github.com/dotnet/TorchSharp/blob/3d01e74707e3058cf82eeca7c6fe99ba13729e2f/src/TorchSharp/Torch.cs#L60

should really just use the full TryLoad overload.

Dominant language
C#
Stars
1.9k
Forks
228
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/TorchSharp

All issues in dotnet/TorchSharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.