Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • Paddle
  • Issue
  • #892

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看板
已关闭
开放中
Opened 12月 14, 2016 by saxon_zh@saxon_zhGuest

Paddle Function

Created by: hedaoyuan

The main purpose of refactoring Paddle's computationally related code is to use a unified interface to represent each function. The function here can be understood as an operator in a neural network. Refactoring these computationally related codes mainly to solve the following three issues.

  • Lack of unified function interface description In Paddle, the definition of Layer has a unified interface, but a Layer often call a number of functions, these functions do not have a unified interface description. If I just want to write an FFT-based convolution forward calculation for model inference, which interface should I refer to?
  • Refactor the interfaces listed in ISSUE #977 (closed) Most of these functions are defined as a member function of the Matrix, but it does not specify how the member function interface of the Matrix should be defined. This has encountered some problems in interface readability and interface testing (#385 (closed)).
  • Import third-party library, such as cuDNN, NNPACK, to improve the computational performance of Paddle on different hardware platforms(such as #2177 (closed)). To import a third-party library requires a piece of code to wrap the interface provided by the third-party library to facilitate calls in Paddle. So, what needs to be considered is how to simplify the writing of this wrapper code.

A unified function interface description

Paddle has many computationally related code(ISSUE #997 (closed)), by analyzing these interfaces, we can understand that what issues needs to solve.

  1. A calculation function that has one input and one output(https://github.com/PaddlePaddle/Paddle/issues/892#issuecomment-267358563).
  2. A calculation function that has multiple inputs and multiple outputs(https://github.com/PaddlePaddle/Paddle/issues/892#issuecomment-267358563).
  3. Some of the interfaces will assign the result to the output, while others will add the result to the output(https://github.com/PaddlePaddle/Paddle/issues/892#issuecomment-267358563).
  4. The same function is implemented as multiple versions based on different devices. At present, for CPU and GPU two devices, the realization of the CpuMatrix::memberFunction and GpuMatrix::memberFunction two functions.
  5. The same function is implemented as multiple versions based on different data type(like double, float). At present, it is done by switching the definition of real at compile time.
  6. Using Matrix and Vector to represent one-dimensional and two-dimensional dense data types;
  7. With a Matrix and a Vector two arguments to represent an argument of the sequence type;
  8. SparseMatrix represents the sparse matrix type of NO_VALUE or FLOAT_VALUE;

If we have designed an interface to solve these problems, we can reorganize the code(https://github.com/PaddlePaddle/Paddle/issues/892#issuecomment-267288472) of the interface listed in #997 (closed).

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#892
渝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