Comments (10)
<dependency>
<groupId>com.microsoft.onnxruntime</groupId>
<artifactId>onnxruntime</artifactId>
<version>${onnx.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ai.djl.onnxruntime</groupId>
<artifactId>onnxruntime-engine</artifactId>
<exclusions>
<exclusion>
<groupId>com.microsoft.onnxruntime</groupId>
<artifactId>onnxruntime</artifactId>
</exclusion>
</exclusions>
</dependency>
from djl.
这是windows system32 onnxruntime.dll 依赖关系,跟这个有关系么
from djl.
UnsatisfiedLinkError
most likely you don't have DLL that onnxruntime is depends on. Can you try to install install Visual C++ 2019 Redistributable Packages and reboot
from djl.
我把之前的Visual C++都删了,安装了下2019这个版本,电脑也重启了,还是不行
from djl.
即便 重新下载一个 onnxruntime ,加载指定的onnxruntime.dll文件,也不行呢,看DLL依赖也没报错。原因大概率是windows环境问题,但是好难排查
from djl.
You can try to install VS, and use dumpbin.exe
to check dependencies
from djl.
dumpbin
Dump of file C:\Windows\System32\onnxruntime.dll
File Type: DLL
Image has the following dependencies:
api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-string-l1-1-0.dll
api-ms-win-core-processenvironment-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-synch-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-0.dll
api-ms-win-core-localization-l1-2-0.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-sysinfo-l1-2-0.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-core-heap-l2-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-libraryloader-l1-2-0.dll
api-ms-win-core-rtlsupport-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-1.dll
api-ms-win-core-sysinfo-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
api-ms-win-core-fibers-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-core-path-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-memory-l1-1-0.dll
api-ms-win-core-processtopology-obsolete-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-3.dll
api-ms-win-core-file-l1-2-0.dll
api-ms-win-eventing-provider-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-core-libraryloader-l1-2-1.dll
Image has the following delay load dependencies:
d3d12.dll
dxgi.dll
DirectML.dll
OLEAUT32.dll
api-ms-win-core-com-l1-1-0.dll
Summary
15000 .data
1000 .didat
2B000 .pdata
10F000 .rdata
9000 .reloc
1000 .rsrc
5F5000 .text
1000 _RDATA
from djl.
There are two dll in the jar file. ai/onnxruntime/native/win-x64/onnxruntime4j_jni.dll
and ai/onnxruntime/native/win-x64/onnxruntime.dll
, can you check both dependencies?
And also why you copy onnxruntime.dll to system32 directory? It supposed to be extracted to temp folder at runtime.
dumpbin /dependents onnxruntime4j_jni.dll
from djl.
That kind of UnsatisfiedLinkError
is typically because an older version of the ONNX Runtime native library was loaded from somewhere else on your classpath, as it's after the JNI binding has loaded. It means there's a mismatch between the native library and the ONNX Runtime class files.
from djl.
feel free to re-open this issue if still have questions.
from djl.
Related Issues (20)
- pytorch-model-zoo: PtSsdTranslator.Builder.self() returns null
- TextEmbeddingTranslator fails with "EngineException: Expected all tensors to be on the same device"
- tensorrt 的demo 有吗 yolov8的
- resize diff between java djl and python cv2 HOT 1
- Does Lightgbm support multi-class inference? HOT 1
- ONNX Engine Options Bug, ONNX features cannot be defined,It's a parameter type design problem HOT 4
- [pytorch] UnsatisfiedLinkError on Windows11/Intel HOT 7
- Windows libraries for pytorch-native-cpu are missing for version 2.3.0 from maven central. HOT 1
- ai.djl.nn.transformer IdEmbedding has memory leak. HOT 2
- PaddlePaddle引擎使用paddleocr v4版本的模型识别图像时报错,是还不支持paddleocr的v4模型吗? HOT 2
- TimeSeries API PyTorch Engine support
- TimeSeries API Bugs (frequency, context length, FEAT_DYNAMIC_REAL) HOT 6
- CPU Version of TensorFlow Native Package Incorrectly Includes GPU Dependencies HOT 2
- Can I load a pytorch pretrained model, and use its block to replace one in my network? HOT 1
- MXNet NLP GloVe model causes error "Native resource has been released already" HOT 3
- When there are multiple engines on the classpath, DJL might randomly select a non-optimal one
- TfModel doesn't support `Model#load(InputStream is)` HOT 4
- Memory leak in HF tokenizer when using truncation and optWithOverflowingTokens(false) HOT 1
- TF engine memory not fully released HOT 4
- LSTM .optReturnSequence(false) method missed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djl.