microsoft / microsoft/onnxruntime
Is it possible to make NumThreads and CurrentThreadId methods of the Threadpool class public?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 179
Description
Is your feature request related to a problem? Please describe.
We want to interface Onnx Runtime threadpool with our EP but to do this, we need access to the NumThreads and CurrentThreadId methods of the class, but they are private.
Describe the solution you'd like
Make NumThreads and CurrentThreadId methods of the Threadpool class public.
Describe alternatives you've considered
Create public getter methods to access these values.
Additional context
In order to integrate ORT threadpool with the oneDNN ep, we require to interface the threadpool with the oneDNN library, in order to do this we need access to these methods. We have been working in this change for a long time and we are ready to make a PR, but we wanted to hear your thoughts about this change before doing it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Threadpool class and inspect the private NumThreads and CurrentThreadId methods, then review how the oneDNN execution provider needs to interface with the ONNX Runtime threadpool. Confirm whether making those methods public or adding getters is the accepted API direction; done means the chosen interface supports that integration and is covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100