Open
Description
Describe the issue
Having DLL load error on Windows 11 with onnxruntime-directml
1.22.0 for my pytest test. Version 1.20.1, 1.20.0 tested working. Seems like version 1.22.0 no longer searches PATH
for DLLs automatically?
MSVC redist version: 14.44.35208 (latest)
Pytest version tested: 8.2.2-8.3.3
Same issue identified for onnxruntime
.
To reproduce
- Install onnx runtime with
pip install onnxruntime-directml==1.22.0
. - Create
test_1.py
andtest_2.py
with the code below:
# test_1.py
def test_onnxruntime_directml_import():
import onnxruntime
# test_2.py
import onnxruntime
def test_import_onnx():
pass
- Run
pytest test_1.py
. This failed on my machine with the following error:
ImportError: DLL load failed while importing onnxruntime_pybind11_state:
A dynamic link library (DLL) initialization routine failed.
- Run
pytest test_2.py
. This also failed with the same error above. - For comparison, run
python
and in python run>> import onnxruntime
. This works fine on mine.
Urgency
No response
Platform
Windows
OS Version
Windows 11 Enterprise version 24H2
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.22.0
ONNX Runtime API
Python
Architecture
X64
Execution Provider
DirectML
Execution Provider Library Version
No response