Giter VIP home page Giter VIP logo

Comments (7)

zhaoyuchen2018 avatar zhaoyuchen2018 commented on May 16, 2024

image

从profile结果看 stack 和stack_grad op的 cpu耗时太多

from benchmark.

zhaoyuchen2018 avatar zhaoyuchen2018 commented on May 16, 2024

image

从tracing文件来看 stack_grad耗时很多,很大可能在等待GPU的操作

from benchmark.

zhaoyuchen2018 avatar zhaoyuchen2018 commented on May 16, 2024
  paddle     tf    
op Calls time cost(ms)   op calls time cost(ms)
stack_grad 12 719.9        
stack 15 347.6        
elementwise_mul 305 96   Mul 1203 132.4
matmul_grad 186 191.4   BatchMatMulV2 370 315.8
transpose2_grad 383 179.8        
transpose2 406 197.3   Transpose 1236 260.6
matmul 193 74   MatMul 373 154.8
             
total   1806       863.6

OP对比如上图所示,完整的OP没有贴出来,首先针对这些占比较大的进行优化

from benchmark.

zhaoyuchen2018 avatar zhaoyuchen2018 commented on May 16, 2024

优化stack op:PaddlePaddle/Paddle#21940
优化后xlnet-ernie: 1.005,提升~4%

image

from benchmark.

zhaoyuchen2018 avatar zhaoyuchen2018 commented on May 16, 2024

优化transpose后:1.337516 steps/s

image

image

from benchmark.

zhaoyuchen2018 avatar zhaoyuchen2018 commented on May 16, 2024

image
在计算element_wise之前 大量时间被浪费在CPU和GPU的sync

from benchmark.

zhaoyuchen2018 avatar zhaoyuchen2018 commented on May 16, 2024

image
优化了data transform之后性能提升~8%

from benchmark.

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.