djl icon indicating copy to clipboard operation
djl copied to clipboard

推理慢

Open 201723201401012 opened this issue 2 years ago • 4 comments

使用pytorch引擎,在x86环境上推理一张图片,一百多毫秒,在aarch64 却要十秒多,是缺少什么组件么

201723201401012 avatar Oct 30 '23 10:10 201723201401012

@201723201401012 Can you try python on your aarch64 and and if python is working fine?

Here is how we build: https://github.com/deepjavalibrary/djl/blob/master/.github/workflows/native_jni_s3_pytorch.yml#L264-L273

We have a lot of customer running DJL on AWS c6g and c7g instance. Our benchmark show c7g actually a bit faster the x86

frankfliu avatar Oct 30 '23 15:10 frankfliu

@frankfliu python可以正常运行,我的基础镜像用的是ubuntu20,里面就下了jdk和tomcat,我们有两份环境x86和aarch64 ,aarch64推理就很慢,不知道如何排查,https://github.com/deepjavalibrary/djl/blob/master/.github/workflows/native_jni_s3_pytorch.yml#L264-L273 这个里面用了amazonlinux:2这个镜像,难道我要切换到这个基础镜像?

201723201401012 avatar Oct 31 '23 01:10 201723201401012

@frankfliu Can you help me? This is very important to me

201723201401012 avatar Oct 31 '23 13:10 201723201401012

@201723201401012

Can you try to use djl-bench and see if the performance is related to PyTorch or not: https://docs.djl.ai/master/docs/serving/benchmark/index.html

frankfliu avatar Oct 31 '23 17:10 frankfliu