microsoft / microsoft/onnxruntime
RunAsync with global (environment) Threadpool
@RandySheriffH is already working on this.
Since Aug 14, 2023.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the issue
I expected `RunAsync` api call would also work when global threadpool is configured. It apparently fails unexpectedly with below error:
```
intra op thread pool must have at least one thread for RunAsync
```
### To reproduce
1) Configure a global threadpool via `CreateEnvWithGlobalThreadPools()` with intra thread pool of size 4,
2) Create a session via `CreateSessionFromArray()` after disabling per session thread with `DisablePerSessionThreads()`,
3) Run an inference on the session with `RunAsync()`.
### Urgency
_No response_
### Platform
Linux
### OS Version
Ubuntu 22.04
### ONNX Runtime Installation
Built from Source
### ONNX Runtime Version or Commit ID
1.16
### ONNX Runtime API
C
### Architecture
X64
### Execution Provider
Default CPU
### Execution Provider Library Version
_No response_
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.
Assessment
This issue has not been assessed yet.