Git Product home page Git Product logo

test_speed's Introduction

项目内容

GPU上测试torch/onnx/jax的inference 速度

  • torch.profile检测gpu状态
  • 实际inference速度

项目架构

利用test_speed.py 进行速度测试。主要调用speed package:

  • speed
    • jax (jax inference)
    • onnx (onnx inference)
    • torch (torch inference)
    • utils (dataload & torch profile)

执行

bash test_speed.sh

结果

目前以bert-base测试,目前结果为(单位为 sen/s):

bsz 32 64 256
torch 792.92
jax 812.01
1.02 x

环境

pip install torch==1.8.0 torchvision==0.8.2+cu92
pip install flax==0.5.3 jax==0.3.15 jaxlib==0.3.15+cuda11.cudnn805 
pip install onnxruntime-gpu==1.8.1 onnx==1.9.0 onnxconverter_common==1.8.1

google/jax#8497

test_speed's People

Watchers

LYF avatar

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.