Multithreading safety

Open
#941 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, pytorch

Research direction

No files, tests, or entry points are named. Start by reviewing the library's existing scope and memory-management documentation and the thread-safety assumptions for inference in a multithreaded REST service. Done means documenting whether concurrent inference and global scope handling are safe, including any required usage constraints.

Written by the indexing model from the issue text.

Description

Great library but please provide some information on multi threading safety.
In production use, models are normally wrapped into REST service which is inherently multithreaded. The Torch itself is safe to use for inference in that matter.
Not sure if your library keeping it this way. Major concern is introduction of scopes for memory management.
Stack of scopes seems to me existing on global level which can be a problem. Not sure what else.

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.