Code Monkey home page Code Monkey logo

Comments (10)

jm12138 avatar jm12138 commented on June 1, 2024

感觉引起性能差异的应该是 onnxruntime,请问所使用的环境中 onnxruntime 的版本是一致的吗?还有测试运行时间时,有没有提前加载模型进行预热,还是只测试了第一张图片的运行速度?

from agentocr.

w-Bro avatar w-Bro commented on June 1, 2024

感觉引起性能差异的应该是 onnxruntime,请问所使用的环境中 onnxruntime 的版本是一致的吗?还有测试运行时间时,有没有提前加载模型进行预热,还是只测试了第一张图片的运行速度?

onnxruntime是一样的,1.8.1,图片多次测试过,没有明显变化,而且我看warmup默认为True,也是有预热的。

from agentocr.

w-Bro avatar w-Bro commented on June 1, 2024

@jm12138 microsoft/onnxruntime#9732
在onnxruntime问了下,让我设置intra_op_num_thread这个参数,我改了但也还是一样,不过好像发现和模型也有关系,ch_s_rec这个模型在window跟centos预测速度是有差异的,ch_v2_c_rec这个模型在两个系统的速度倒是接近,会不会是ch_s_rec在转换onnx的时候有什么不同?

from agentocr.

GT-ZhangAcer avatar GT-ZhangAcer commented on June 1, 2024

我感觉是指令集的可能性会更大一些,不管是5800H还是8700,对AVX512支持要优于E5-2680,不同操作系统对指令集的优化也是有区别的。
尽管深度学习并不严格要求使用AVX512,但这个指令集支持越好,速度也会越快。

from agentocr.

w-Bro avatar w-Bro commented on June 1, 2024

我感觉是指令集的可能性会更大一些,不管是5800H还是8700,对AVX512支持要优于E5-2680,不同操作系统对指令集的优化也是有区别的。 尽管深度学习并不严格要求使用AVX512,但这个指令集支持越好,速度也会越快。

这一块就不太了解了,最开始确实是怀疑CPU+OS引起的环境差异导致的,但是今天同样都换了ch_v2_c_rec作为识别模型,发现速度已经几乎相等,所以感觉还是在ch_s_rec这个模型转换过程或者onnxruntime有针对性的兼容性问题。

from agentocr.

GT-ZhangAcer avatar GT-ZhangAcer commented on June 1, 2024

这个并不是充要条件,网络设计不同,AVX带来的效果也是不同的

from agentocr.

snnn avatar snnn commented on June 1, 2024

你设置完intra_op_num_thread之后CPU usage如何,速度如何?

你给的两个CPU都没有AVX512。onnxruntime会使用AVX512加速。AVX512的影响很大。

E5-2680 v4虽然有14个核,但是它的基础频率很低,只有2.4G. 你只分4个核出来,那当然很慢了。2.4 x 4=9.6。相比而下AMD Ryzen 7 5800H 3.2 x 8=25.6。 这两个相差2.6倍啊。和你说的7.2秒vs2.5秒很吻合。不过那个E5-2680 v4是server的cpu,应该可以更快。

from agentocr.

w-Bro avatar w-Bro commented on June 1, 2024

你设置完intra_op_num_thread之后CPU usage如何,速度如何?

你给的两个CPU都没有AVX512。onnxruntime会使用AVX512加速。AVX512的影响很大。

E5-2680 v4虽然有14个核,但是它的基础频率很低,只有2.4G. 你只分4个核出来,那当然很慢了。2.4 x 4=9.6。相比而下AMD Ryzen 7 5800H 3.2 x 8=25.6。 这两个相差2.6倍啊。和你说的7.2秒vs2.5秒很吻合。不过那个E5-2680 v4是server的cpu,应该可以更快。

了解,我重新在虚拟机分配了8个CPU(应该是4核8线程),cpu占用能到360%,速度也有两秒的提升。

from agentocr.

SuperLee188 avatar SuperLee188 commented on June 1, 2024

onnxruntime会使用AVX512加速
想请教一下这个可以理解为对于支持AVX指令集的CPU,OnnxRuntime默认会使用AVX512加速吗

from agentocr.

jm12138 avatar jm12138 commented on June 1, 2024

onnxruntime会使用AVX512加速
想请教一下这个可以理解为对于支持AVX指令集的CPU,OnnxRuntime默认会使用AVX512加速吗

这个得去onnxruntime那问了,具体我也不清楚

from agentocr.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.