Comments (7)
从profile结果看 stack 和stack_grad op的 cpu耗时太多
from benchmark.
从tracing文件来看 stack_grad耗时很多,很大可能在等待GPU的操作
from benchmark.
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.
优化stack op:PaddlePaddle/Paddle#21940
优化后xlnet-ernie: 1.005,提升~4%
from benchmark.
优化transpose后:1.337516 steps/s
from benchmark.
在计算element_wise之前 大量时间被浪费在CPU和GPU的sync
from benchmark.
from benchmark.
Related Issues (20)
- CUDA device is not set properly
- Optimize the performance of Transformer-Big on 1 V100 GPU HOT 10
- Optimize the performance of PyramidDNN on CPU HOT 38
- SEResnet50 模型定义问题 HOT 1
- Optimize the performance of seq2seq model on GPU HOT 2
- Optimize inference performance of ERNIE on P40 GPU HOT 14
- Missing definition of the OpenACC API routine/s in the OpenACC library linked to the application
- AttributeError: module 'paddle' has no attribute 'fluid'
- OP Benchmark 测试算子性能的时候无法使用nsight system HOT 2
- Optimize inference performance of ERNIE on CPU HOT 51
- Optimize train performance of StarGAN on V100 GPU HOT 4
- Optimize the performance of Cascade On V100 HOT 7
- Retinanet performance improvement On V100 HOT 2
- Optimize train performance of STGAN on V100 GPU HOT 3
- mask-rcnn-fpn optimize HOT 2
- Optimize inference performance of ERNIE INT8 on CPU HOT 26
- The design and optimization of API Benchmark HOT 1
- Optimize the performance of CQDNN on CPU HOT 3
- MobilenetV1 profile for optimizing HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from benchmark.