GithubHelp home page GithubHelp logo

Comments (5)

zhiqwang avatar zhiqwang commented on May 22, 2024

Hi @jinfagang ,

Thanks for your attention here!

At that time, my first plan is to let each side could compile and infer successfully, and because of time limited, I have not carefully compared the time of each side between libtorch, onnxruntime and tvm. (I have the plan to support openvino, also for the time limited, I haven't done this now).

Now, I'm writing and refactoring the trainer, after this is done, I will add the documents of time consuming and comparison.

BTW, we are welcome for contributions in any ways.

from yolort.

zhiqwang avatar zhiqwang commented on May 22, 2024

And I've uploaded the notebooks of tvm compiling and inference here, within my current experience, the procedure of compiling will consume much more time than libtorch or onnxruntime. the procedure of inference seems normal (Edit: more experiments needed here)

This repo is my first glance on tvm, and I will do more experiments on it.

from yolort.

lucasjinreal avatar lucasjinreal commented on May 22, 2024

@zhiqwang That's weried, tvm should be faster if compares on same CPU device? at least should faster than onnxruntime if chosen CPU as provider.

from yolort.

zhiqwang avatar zhiqwang commented on May 22, 2024

tvm should be faster if compares on same CPU device? at least should faster than onnxruntime if chosen CPU as provider.

Hi @jinfagang , I agree with you on this point, and this is my goal. The current realization on the tvm backend is only the initial attempt, let us do more efforts to achieve this goal!

from yolort.

zhiqwang avatar zhiqwang commented on May 22, 2024

Hi @jinfagang

I've added a rough comparison of inference time consumed on Jupyter notebook (iPython).

  • On the ONNXRuntime backend,

    CPU times: user 2.04 s, sys: 0 ns, total: 2.04 s
    Wall time: 55.8 ms
  • On the TorchScript backend,

    CPU times: user 2.03 s, sys: 32 ms, total: 2.06 s
    Wall time: 60.5 ms
  • On the PyTorch backend,

    CPU times: user 3.87 s, sys: 60 ms, total: 3.93 s
    Wall time: 116 ms
  • On the TVM backend,

    CPU times: user 528 ms, sys: 364 ms, total: 892 ms
    Wall time: 22.3 ms

You could check the latest updated notebook for more details.

BTW, the displayed time of the onnxruntime notebook is on GPU, I just test it locally.

Although this comparison is a bit rough, we could come to this conclusion that tvm will increase inference speed on CPU device.

So I'll close this issue. If you have more concerns please let me know.

from yolort.

Related Issues (20)

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.