-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] onnxruntime-gpu 1.14.x is not thread safe #15154
Comments
I tried to compile from source code and reproduce the issue, and found that the bug was introduced by this commit 13495, which means that the program runs well when built from commit 13941, but when compiled from commit 13495, the issue can be reproduced. |
@mzchtx Thanks for reporting and the script! We can repro this issue locally and it should be related with non-default stream. We are investing it now and will update this thread once there is any progress |
@mzchtx Could you try to disable memory pattern by adding the following line after creating sessionOptions: options.enable_mem_pattern = False please let us know how it goes |
there is a bug in the memory pattern feature for multi-stream. we are working on the fix, at meantime, @mzchtx, the "options.enable_mem_pattern=False" trick should be able to help you workaround it. Let's know whether it helps. |
It works, options.enable_mem_pattern = False can solve this issue. |
### Description Create a stream in DeviceStreamCollection for memory pattern case to fix the thread safe issue 15154 ### Motivation and Context This is to fix the bug 15154 #15154
checked in fix #15426 |
Describe the issue
There is a thread-safe issue in onnxruntime-gpu 1.14.x. You can use the following configuration to reproduce this bug:
The following configurations do not have this issue:
Does this bug was introduced by the following feature?
To reproduce
The resnet18-v2-7.onnx model is from onnx/models/resnet18-v2-7.onnx
Urgency
No response
Platform
Linux
OS Version
Ubuntu 20.04.1 LTS
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.14.x
ONNX Runtime API
Python
Architecture
X64
Execution Provider
CUDA
Execution Provider Library Version
CUDA 11.6
The text was updated successfully, but these errors were encountered: