microsoft / microsoft/onnxruntime

Question about ORT threading

Open
#13,974 1 comment 1 reaction 1 assignee View on GitHub

@natke is already working on this.

Since Jan 5, 2023.

core runtime documentation
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the issue

Could you, please, explain in more detail how onnxruntime chooses the optimal number of threads when creating a session?

There are 2 variables **inter_op_num_threads** and **intra_op_num_threads** and the documentation says that the values for this variables are best left equal to 0 to allow the onnxruntime to choose an appropriate value, but I want to understand based on what optimal values are chosen (maybe there is some kind of formula)?

you can attach any links to useful materials or code

Thank you in advance.

### To reproduce

nothing to reproduce

### Urgency

_No response_

### Platform

Linux

### OS Version

Ubuntu

### ONNX Runtime Installation

Released Package

### ONNX Runtime Version or Commit ID

1.10.0

### ONNX Runtime API

Python

### Architecture

X64

### Execution Provider

Default CPU

### Execution Provider Library Version

_No response_

### Model File

_No response_

### Is this a quantized model?

No

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.