1. 03 3月, 2022 1 次提交
  2. 02 3月, 2022 1 次提交
  3. 01 3月, 2022 1 次提交
  4. 24 2月, 2022 1 次提交
  5. 23 2月, 2022 2 次提交
  6. 22 2月, 2022 1 次提交
  7. 18 2月, 2022 1 次提交
  8. 15 2月, 2022 1 次提交
    • R
      [PluggableDevice] Add custom runtime support (#38740) · 3e7825f3
      ronnywang 提交于
      * [CustomRuntime] Add DeviceManager
      
      * [CustomRuntime] Add DeviceInterface
      
      * [CustomRuntime] Add Stream, Event, DeviceGuard, CallbackManager
      
      * [CustomRuntime] Add plug-in device
      
      * [CustomRuntime] Memory module support PluggableDevice
      
      * [CustomRuntime] Add WITH_PLUGGABLE_DEVICE cmake option
      
      * update
      
      * [API] update API doc based on comments, test=develop
      Co-authored-by: Nqili93 <qili93@qq.com>
      3e7825f3
  9. 10 2月, 2022 1 次提交
    • Z
      Added python-c code generation for final state Eager Dygraph (#39233) · 43f84d0f
      Zhanlue Yang 提交于
      * Removed debug info
      
      * Added automatic code generation for final state Eager Dygraph
      
      * Modified backward yaml
      
      * Added EagerUtils helper functions for final state CodeGen
      
      * Adjusted CMakeFiles to support compilation for final state auto generated codes
      
      * Added python-c code generation for final state Eager Dygraph
      
      * Fixed minor issue
      
      * Fixed yaml.load() method failure
      
      * Fixed minor issues
      
      * Refactored Python-C Attributes Parsing Functions
      
      * Fixed minor issue with Python-C AddFunctions
      
      * Fixed issues from merge
      
      * Fixed merge issues
      43f84d0f
  10. 28 1月, 2022 1 次提交
    • F
      [PSLIB] Add Metrics Module, Support User-defined Add Metric (#38789) · 2e6be886
      Fan Zhang 提交于
      * [PSLIB] Add Metrics Module, Support User-defined Add Metric
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI Coverage
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI
      
      * [PSLIB] Modify According to CI Coverage
      
      * [PSLIB] Modify According to CI Coverage
      
      * [PSLIB] Modify According to CI Coverage
      
      * modify role_maker
      
      * update CMakeLists.txt
      2e6be886
  11. 27 1月, 2022 1 次提交
    • A
      [PluggableDevice] Add custom kernel support based on pten kernel management (#38848) · a8879215
      Aganlengzi 提交于
      * [Demo] custom kernel based on pten kernel
      
      * merge and npu custom work well
      
      * del comments
      
      * delete other code
      
      * fix CUDAContext
      
      * fix not found small_vector.h
      
      * support NPU
      
      * fix NPUContext
      
      * fix DeviceContext support
      
      * add UT
      
      * fix call
      
      * add UT
      
      * fix
      
      * fix for comments and ut
      
      * add MACRO control
      
      * fix multi input output
      
      * support env CUSTOM_DEVICE_ROOT
      
      * deal with special cases
      
      * fix for Windows
      
      * try coverage with test_custom_kernel_dot.py
      
      * fix test_custom_kernel_dot
      
      * fix test_custom_kernel_dot
      
      * fix merge
      
      * fix merge
      
      * fix CI
      
      * update
      
      * merge and fix
      
      * remove WITH_CUSTOM_KERNEL
      
      * fix merge
      
      * merge and fix
      
      * fix ut
      
      * fix ut for mac
      
      * add more UT
      
      * add more UT
      
      * fix
      a8879215
  12. 26 1月, 2022 2 次提交
  13. 26 12月, 2021 1 次提交
    • C
      [PTen] Move copy kernel impl (#38421) · 73819658
      Chen Weihang 提交于
      * add register general kernel marco
      
      * move copy kernel impl
      
      * revert needless change
      
      * polish details
      
      * fix xpu compil faild
      
      * fix xpu compile failed
      
      * polish format
      73819658
  14. 20 12月, 2021 1 次提交
  15. 16 12月, 2021 2 次提交
    • J
      support eager switch system (#38170) · 8305c2be
      Jiabin Yang 提交于
      * support eager switch system
      
      * polish code
      8305c2be
    • Z
      Enabled Eager AutoCodeGen for All Existing Operators & Possible Future Operators (#37969) · 08482a86
      Zhanlue Yang 提交于
      * Rearranged Eager AutoCodeGen directory structure
      
      * Removed USE_OP in Eager AutoCodeGen
      
      * Enabled generation for Operators without Grad/Inputs/Outputs
      
      * Resolved operators without input
      
      * Fixed merge conflicts
      
      * Enabled Eager AutoCodeGen for 10+ more operators
      
      * Refactored Eager AutoCodeGen with more organized helper objects
      
      * Enabled Eager AutoCodeGen for operators with multiple OpBases
      
      * Adjusted Eager AutoCodeGen to Enable Passing Output Tensor as Input Argument
      
      * Handled Dispensable Inputs/Outputs in Eager AutoCodeGen
      
      * Enabled Eager AutoCodeGen for All Existing Operators & Possible Future Operators
      
      * Fixed CI issues
      08482a86
  16. 15 12月, 2021 1 次提交
    • Z
      Synchronized auto-generated Python-C API with Dygraph Forward Functions (#38017) · 77dfb2e8
      Zhanlue Yang 提交于
      * Rearranged Eager AutoCodeGen directory structure
      
      * Removed USE_OP in Eager AutoCodeGen
      
      * Enabled generation for Operators without Grad/Inputs/Outputs
      
      * Resolved operators without input
      
      * Fixed merge conflicts
      
      * Enabled Eager AutoCodeGen for 10+ more operators
      
      * Refactored Eager AutoCodeGen with more organized helper objects
      
      * Enabled Eager AutoCodeGen for operators with multiple OpBases
      
      * Adjusted Eager AutoCodeGen to Enable Passing Output Tensor as Input Argument
      
      * Handled Dispensable Inputs/Outputs in Eager AutoCodeGen
      
      * Adjusted function generation/call between Python-C API & Dygraph API
      
      * Synchronized auto-generated Python-C API with Dygraph Forward Functions
      
      * Added safe_initialized interface to EagerTensor for use in processing dispensable inputs
      77dfb2e8
  17. 08 12月, 2021 1 次提交
    • W
      [Eager] generate eager core ops, only 4 ops (#37813) · 52f63cd2
      wanghuancoder 提交于
      * refine a test case, test=develop
      
      * publish python c api for eager, test=develop
      
      * revert modify about test_allclose_layer.py, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * delete numpy includes, use pybind11 numpy.h, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * suport eager error msg, and add grad test case, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * generate eager core ops, only 4 ops, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      52f63cd2
  18. 07 12月, 2021 1 次提交
  19. 06 12月, 2021 1 次提交
  20. 03 12月, 2021 1 次提交
    • W
      [Eager] publish python c api for eager (#37550) · 07b4fe93
      wanghuancoder 提交于
      * refine a test case, test=develop
      
      * publish python c api for eager, test=develop
      
      * revert modify about test_allclose_layer.py, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * delete numpy includes, use pybind11 numpy.h, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      
      * suport eager error msg, and add grad test case, test=develop
      
      * refine, test=develop
      
      * refine, test=develop
      07b4fe93
  21. 23 11月, 2021 1 次提交
  22. 15 11月, 2021 1 次提交
    • C
      [Pten] Refactor the implementation of custom operator (#37122) · 1e598f1a
      Chen Weihang 提交于
      * move extension into pten [no-verify]
      
      * append tensor methods by ext_tensor [no-verify]
      
      * append other tensor methods [no-verify]
      
      * ext related files tidy [no-verify]
      
      * include relation tidy [no-verify]
      
      * add pten tensor test [no-verify]
      
      * replace tensor in custom op & compile success
      
      * refine tensor constructor for unittest
      
      * custom relu jit run success
      
      * fix all custom op unittests
      
      * add inference cmake adapt [no-verify]
      
      * fix failed unittests
      
      * fix windows failed unittests
      
      * try to fix kunlun and inference failed
      
      * fix test_elementwise_api error
      
      * try to fix win compile failed
      
      * fix kunlun fp16 type error
      
      * remove useless haddle error macro
      
      * add custom linear op test
      
      * fix compile failed & add win symbols
      
      * fix non pten kernel cast failed
      
      * add dll decl for api
      
      * polish several deetails
      
      * polish details by review comment
      
      * add dll_decl for register
      1e598f1a
  23. 03 11月, 2021 1 次提交
  24. 29 9月, 2021 1 次提交
    • Z
      Add basic support for CUDA Graph (#36190) · 21b93c3d
      Zeng Jinle 提交于
      * add basic support for CUDA Graph
      
      * fix ci compile error
      
      * fix LOG print, fix windows CI
      
      * follow comments and update
      
      * small fix for default ctor
      
      * fix rocm compile error
      
      * fix CPU compile error
      21b93c3d
  25. 18 9月, 2021 2 次提交
  26. 17 9月, 2021 1 次提交
    • W
      GeneratePass for Python Pass (#35708) · f6db9806
      wuhuanzhou 提交于
      #### 背景
      
      #35602 提供Python侧开发子图替换类Pass的方式:
      
      - 利用Paddle Python API或者辅助类型定义子图program用来匹配/替换图;
      - Python侧注册Pass时,将注册函数最终转换为protobuf定义的PassDesc数据形式,供C++侧进行解析完成Pass实例注册。
      
      本PR即为根据PassDesc规则描述解析生成Pass实例。
      
      #### 方案设计
      
      ##### Pass规则验证
      
      在以往的Pass开发中,会存在随着算子迭代引发的匹配失效或者错误匹配的问题,该问题可以通过扫描算子支持的参数设置及参数类型等来判断是否应该使用该Pass或者给出提示需要修改Pass代码。
      
      当前Pass开发中提供了算子兼容性OpCompatSensiblePass用于解决上述问题。但同时还存在不足:由于以往Pass开发在运行时才能获取到pattern信息,所以需要在执行Pass时才可以判断。
      
      使用PassDesc表示的Pass可以在执行Pass前验证上述问题,这个过程在VerifyDesc中完成。
      
      ##### 根据匹配子图构造pattern
      
      GeneratePass对于图匹配和替换使用GraphPatternDecetor完成,构造匹配pattern实际上就是将对应对象成员PDPattern中添加PDNode和边关系。该过程在函数`InitGeneratePattern`中完成,该函数没有作为GeneratePass的成员方法,主要出于后续可能开发新的Decetor考虑,GeneratePass与Decetor的操作是没有关联的。
      
      初始化pattern主要通过遍历匹配子图program的全部算子实现:
      
      1. 添加当前算子对应PDNode及限制条件(算子类型、属性限制等);
      2. 遍历当前算子对应输入并从pattern中尝试获取PDNode:
         - 在pattern中获取到PDNode且为输出节点:表示属于匹配子图的中间节点,将该PDNode设置为中间节点;
         - 在pattern中没有获取到PDNode:添加该输入PDNode并设置作为输入节点;
         - 设置输入到算子的边关系;
      3. 遍历当前算子对应输出:
         - 在pattern中获取到PDNode且为输入节点:表示属于匹配子图的中间节点,将该PDNode设置为中间节点;
         - 在pattern中没有获取到PDNode:添加该输入PDNode并设置作为输出节点;
         - 设置算子到输出的边关系;
      
      ##### 根据替换子图操作graph
      
      替换子图操作的过程在`GetGenerateRewrite`函数中完成,与`InitGeneratePattern`类似没有作为GeneratePass的成员方法。
      
      生成替换子图操作过程如下:
      
      1. 判断冗余替换子图;
      2. 遍历替换子图program的全部算子添加替换子图Node:
         1. 添加当前算子的Node及属性设置;
         2. 遍历当前算子对应输入,添加中间variable节点;
         3. 遍历当前算子对应输出,添加中间variable节点;
         4. 添加输入/输出节点与算子节点的边关系;
      3. 删除匹配图中属于中间节点的Node;
      
      ##### 优化子图验证
      
      对于替换子图或者替换后的计算图是否可以正确运行等,可以在执行Pass时验证,从而防止在后续执行计算图时出现异常。
      
      当前Pass执行直接修改计算图,验证失败时无法很好的完成还原操作,目前子图验证暂时默认成功,留到后续改进。
      f6db9806
  27. 08 9月, 2021 1 次提交
  28. 18 8月, 2021 1 次提交
  29. 10 8月, 2021 1 次提交
    • C
      copy boost/any.hpp to utils and replace boost::any with self defined any (#34613) · 12892929
      chentianyu03 提交于
      * add any.hpp to utils and replace boost::any with self defined paddle::any
      
      * add copy any.hpp to custom op depends
      
      * modify any.hpp include path
      
      * remove boost from setup.py.in
      
      * add copy any.hpp to custom op depends
      
      * move any.hpp to paddle/utils/ dirs
      
      * move any.h to extension/include direction
      
      * copy utils to right directions
      12892929
  30. 09 8月, 2021 1 次提交
  31. 02 8月, 2021 1 次提交
  32. 19 7月, 2021 1 次提交
    • C
      Add Cuda event and stream API (#32460) · 9c7f6af5
      chentianyu03 提交于
      * add cuda event and stream api
      
      * add cuda event and stream api
      
      * add get_current_stream api
      
      * add get_current_stream api
      
      * init streams
      
      * modify get_current_stream
      
      * modify get_cuttent_stream
      
      * add synchronize func
      
      * add current_stream doc and test file
      
      * move get_current_stream into CUDA macro
      
      * move CudaEvent into CUDA macro
      
      * move _get_current_stream and _device_synchronize into cuda macro
      
      * modify the macro of cuda stream and event
      
      * add test case for synchronize
      
      * add paddle.devices.cuda module
      
      * event and stream support hip
      
      * add doc for stream and event class
      
      * move cuda stream and event into single pybind
      
      * add cuda_streams_py.cc to cmakelist
      
      * add _device_synchronize and _get_current_stream to core module
      
      * add test case for cudastream and cudaevent
      
      * move __all__ in streams.py
      
      * fix test fail
      
      * add cuda to devices __all__
      
      * fix current_stream doc writing error
      
      * move devices to device direction, and merge device.py into __init__.py
      
      * add required:gpu to sample codes
      
      * remove cuda direction from device/__init__.py
      9c7f6af5
  33. 18 6月, 2021 1 次提交
  34. 09 6月, 2021 1 次提交
    • W
      paddle.save support object save to memory. (#32999) · cdd6437a
      WeiXin 提交于
      * support state_dict save to memory.
      
      * Perfect unittest
      
      * perfect unittest.
      
      * suport saving binary var to memory
      
      * polish code.
      
      * packag save/load files into pybind/io.py
      
      * polish code .
      
      * add example for save to memory; remove useless save load function(_load_static_dict,_save_dygraph_dict)
      
      * delete _load_static/dygraph_dict;_save_static/dygraph_dict
      
      * edit example of paddle.save/load
      cdd6437a
  35. 12 5月, 2021 1 次提交
  36. 10 5月, 2021 1 次提交