Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • Paddle
  • 合并请求
  • !21904

P
Paddle
  • 项目概览

PaddlePaddle / Paddle
大约 2 年 前同步成功

通知 2325
Star 20933
Fork 5424
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 1423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
Paddle
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 1,423
    • Issue 1,423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
    • 合并请求 543
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板

optimize the sum calculation of multiple inputs !21904

  • Report abuse
!21904 开放中 12月 24, 2019 由 saxon_zh@saxon_zh 创建
#<User:0x00007fedeba9efa8>
  • 概览 1
  • 提交 6
  • 变更 1

Created by: GaoWei8

CPU SKX 6148型号: 优化前计算方式: eedb2262c0e783c9c7de3b0e6d80c327

优化后计算方式: 4d61dcd479aa427de81630e462901383

3个Tensor尺寸[1280, 2560], 3次sum op调用。 优化前: 33.1969 ms, 优化后: 26.3337ms, 提升 20.67%

  • 优化前
------------------------->     Profiling Report     <-------------------------

Place: All
Time unit: ms
Sorted by  in descending order in the same thread

Event                                               Calls       Total       CPU Time (Ratio)        GPU Time (Ratio)        Min.        Max.        Ave.        Ratio.
thread0::fill_constant                              3           190.968     190.968050 (1.000000)   0.000000 (0.000000)     2.81928     185.274     63.656      0.825612
thread0::sum                                        3           33.1969     33.196943 (1.000000)    0.000000 (0.000000)     11.0564     11.0796     11.0656     0.14352
thread0::fetch                                      1           7.13995     7.139947 (1.000000)     0.000000 (0.000000)     7.13995     7.13995     7.13995     0.0308681
  • 优化后
------------------------->     Profiling Report     <-------------------------

Place: All
Time unit: ms
Sorted by total time in descending order in the same thread

Event                     Calls       Total       CPU Time (Ratio)        GPU Time (Ratio)        Min.        Max.        Ave.        Ratio.
thread0::fill_constant    3           173.255     173.254770 (1.000000)   0.000000 (0.000000)     2.7889      167.637     57.7516     0.839231
thread0::sum              3           26.3337     26.333724 (1.000000)    0.000000 (0.000000)     8.76836     8.7875      8.77791     0.127558
thread0::fetch            1           6.85611     6.856106 (1.000000)     0.000000 (0.000000)     6.85611     6.85611     6.85611     0.0332104

4个Tensor尺寸[1280, 2560], 4次sum op调用。 优化前: 62.8654 ms, 优化后: 43.336761 ms, 提升 31.06%

  • 优化前
------------------------->     Profiling Report     <-------------------------

Place: All
Time unit: ms
Sorted by  in descending order in the same thread

Event                                               Calls       Total       CPU Time (Ratio)        GPU Time (Ratio)        Min.        Max.        Ave.        Ratio.
thread0::fill_constant                              3           190.968     190.968050 (1.000000)   0.000000 (0.000000)     2.81928     185.274     63.656      0.825612
thread0::sum                                        3           33.1969     33.196943 (1.000000)    0.000000 (0.000000)     11.0564     11.0796     11.0656     0.14352
thread0::fetch                                      1           7.13995     7.139947 (1.000000)     0.000000 (0.000000)     7.13995     7.13995     7.13995     0.0308681
  • 优化后
------------------------->     Profiling Report     <-------------------------

Place: All
Time unit: ms
Sorted by total time in descending order in the same thread

Event                     Calls       Total       CPU Time (Ratio)        GPU Time (Ratio)        Min.        Max.        Ave.        Ratio.
thread0::fill_constant    4           183.522     183.522086 (1.000000)   0.000000 (0.000000)     2.77571     175.089     45.8805     0.785169
thread0::sum              4           43.3368     43.336761 (1.000000)    0.000000 (0.000000)     10.7804     10.9012     10.8342     0.185409
thread0::fetch            1           6.87684     6.876843 (1.000000)     0.000000 (0.000000)     6.87684     6.87684     6.87684     0.0294215
指派人
分配到
审核者
Request review from
无
里程碑
无
分配里程碑
工时统计
标识: paddlepaddle/Paddle!21904
Source branch: github/fork/GaoWei8/sum
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7