microsoft / microsoft/onnxruntime

RunAsync with global (environment) Threadpool

Open
#17,149 1 comment 1 reaction 1 assignee View on GitHub

@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

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.