- 17 9月, 2021 3 次提交
-
-
由 Haipeng Wang 提交于
* add scale_op in model save step is not necessary, just fix the prune method to support static graph and inplace op * fix jit.save, no need to add scale_op to each outputvar anymore. fix prune_with_input, now it supports inplace op * temporarily disable test_trt_dynamic_shape.TRTDynamicShapeOutOfBound2Test
-
由 Aurelius84 提交于
* format code * format interface * polish interface * Remove std::memory_order * modify into SpinLock * remove fetch_context_pool_ * fix comment * modify into WorkQueueGroup * refine code * fix pointer * fix paddle_enforce * split into AsyncWorkQueue * polish code * specify std::memory_relax * fix atomic fetch_sub * fix num_thread
-
由 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执行直接修改计算图,验证失败时无法很好的完成还原操作,目前子图验证暂时默认成功,留到后续改进。
-
- 16 9月, 2021 3 次提交
-
-
由 wangguanqun 提交于
* add trainer desc config to distributed strategy * code style modified * data_feed set lod * fix bug * code style * fix bug
-
由 lilong12 提交于
-
由 wuhuanzhou 提交于
PR主要功能:针对fusion等子图替换场景,支持Python侧开发并注册Pass。 背景 Pass是指输入一个深度学习计算图Graph,依照一定条件进行修改,输出修改后的Graph的过程; 当前PaddlePadle框架编写Pass代码存在以下问题: 用户需要手写Graph的条件匹配、在Graph上的修改代码; 对Graph操作需要深入底层框架代码,了解Graph的结构,并且知道相关Pass写法; 我们提出了针对fusion等子图替换类Pass的优化方案以支持用户在Python侧开发注册Pass,提升二次开发体验: 用户只需要输入匹配和替换的子图描述,由深度学习框架编写的代码来生成匹配和替换的逻辑,不需要用户对Graph进行匹配和替换操作; API级别的替换,用户可以通过Paddle的Python API构造子图,从而不需要知道Graph的结构,也能写Paddle的Graph Pass代码
-
- 15 9月, 2021 3 次提交
-
-
由 wanghuancoder 提交于
* add inplace logic into new_executor, test=develop * check shape and add inplace FLAGS, test=develop * refine, test=develop * refine, test=develop
-
由 王明冬 提交于
* clip op extra information when export model,test=ocr * rename clip_extra parameter to kwargs in save_inference_model, test=ocr
-
由 WangXi 提交于
-
- 14 9月, 2021 6 次提交
-
-
由 yaoxuefeng 提交于
-
由 JingZhuangzhuang 提交于
* add dropout convert test * modify dropout convert test Co-authored-by: Nxiaoxiaohehe001 <hiteezsf@163.com>
-
由 wanghuancoder 提交于
-
由 Aurelius84 提交于
-
由 Yuang Liu 提交于
-
由 Aurelius84 提交于
Intergrate StandaloneExecutor in Static.Executor Interface with FLAGS_USE_STANDALONE_EXECUTOR (#35628) * Intergrate StandaloneExecutor in Static.Executor Interface with FLAGS_USE_STANDALONE_EXECUTOR * Enhance unittest and clean code in StandaloneExecutor * polish unittest
-
- 13 9月, 2021 1 次提交
-
-
由 lidanqing 提交于
-
- 12 9月, 2021 1 次提交
-
-
由 王明冬 提交于
-
- 11 9月, 2021 2 次提交
-
-
由 wanghuancoder 提交于
* refactor gc, test=develop * refine, test=develop * refine, test=develop * refine, test=develop * gc each tensor, test=develop * refine, test=develop
-
由 王明冬 提交于
-
- 10 9月, 2021 2 次提交
-
-
由 hlygit66666 提交于
* add test_cumprod_op * Revert "add test_cumprod_op" This reverts commit c96cf6dff5d09ae7d8cc72c1e8ae4369a153aa19. * recommit * add error message * test input(x) initialize * test use cpu * update test code * add test type * add test case * solve ci problem * add complex case test * add complex case test * fix review problem * fix conflict * fix some docs * change test case * change test case * fix review problems again * fix docs * fix inclusivescan bug
-
由 chentianyu03 提交于
* import ska flat_hash_map * add define NOMINMAX macro to fix windows build failed bug * add brackets to std::max in flat_hash_map * move flat_hash_map directions * modify namespace to paddle * modify namespace to paddle * modify namespace to paddle * modify namespace to paddle * rm not used map.h and replace with op_info
-
- 08 9月, 2021 5 次提交
-
-
由 Yulong Ao 提交于
* add auto_parallel dir * mv to paddle.distributed * add shard_xx api * add distributed attrs for var * add ut, test=develop * add dist * update * update * update * update * update * update, test=develop * update, test=develop * update, test=develop * update, test=develop * update, test=develop * update, test=develop * update, test=develop * update * update * update * update * update * update, test=develop * update, test=develop * update * update * delete unused proto * resotre op_desc * restore type_defs * update var_desc * remove dimss_mapping for proto_pybind * update interface.py * update framework.py * update * update * add auto_parallel dir * mv to paddle.distributed * add shard_xx api * add distributed attrs for var * add ut, test=develop * [WIP] Add the auto completion feature and related codes * [WIP] Improve the auto completion and related codes * [WIP] Make the auto completion to support data-parallel * [WIP] Make the completion support mp and dp+mp * [WIP] Refactor auto completion unit test for MLP * [WIP] Refactor the implementation of DistributedOperatorImpl * [WIP] Improve dims_mapping update rule and fix a bug * [WIP] Support auto completion for one transformer decoder layer * [WIP] Add a minor change * [WIP] Fix a bug within the uint test * Shard XShape tensor, add embedding completion and refactor code * Add the distributed_operators dir to setup.py.in * Improve the completion process and add the unittest for gpt * fix process_mesh ut * fix process_mesh ut * update * update, test=develop * Add support for automatically completing distributed attrs of special ops * update * update * update * fix doc sample codes, test=develop * improve coverage, test=develop * add static_mode check, test=develop * Model the cluster for cost model and physical mapping * update, test=develop * add set_placement, test=develop * Add the check to make sure the candidate tensors' size is great than zero * update doc, test=develop * update doc, test=develop * update doc, test=develop * update doc, test=develop * update, test=develop * Auto mark dist attrs annotated by user * update ndarray to nested list, test=develop * update, test=develop * Add auto-completion module for auto-parallel (based on PR#33804) * Remove unnecessary files * Remove unrelated files for the auto completion pr * Update the unit test to improve the coverage * Modify codes based on reviews * Minor changes for CI * Improve some codes based on new comments * Fix bugs caused by shallow copy in attributes.py * Imporve amend_distributed_attr_for_program in context.py * Other changes for weihang's comments * support shard reader * support shard reader * add parallel mode * update process mesh * add method to compute comm_group * implement dist_embedding forward func * implement dist matmul forward func * implement dist reshape forward func * add transpiler framework * add transpiler forward * implement transpiler forward * implement transpiler backward & update * add process * add unitest * chmod * chmod * chmod * update unitest * add unitest for gpt * remove unused print * rename transpiler --> partitioner * rename transpiler --> partitioner * chmod * chmod * bug fixed * remove amp function * update case for dp mode * update case for dp mode * [Auto Parallel] Integrate all parts with the newest code * Integrate all parts of auto parallel and improve codes * Integrate all parts by AutoParallelizer * Add unit test for AutoParallelizer * Improve auto completion module for pipeline parallel * Add support for matmul_v2 in dist_matmul * Correct the typo "stratergy" to "strategy" * Modify distributed_strategy.proto to conform the main stream * Restore parts of distributed_strategy to conform the develop branch Co-authored-by: Nsandyhouse <lilong12@baidu.com> Co-authored-by: NJZ-LIANG <jianzhongliang10@gmail.com>
-
由 wanghuancoder 提交于
* refactor new executor, test=develop * refine, test=develop * refine, test=develop * refine, test=develop * refine, test=develop * refine, test=develop * refine, test=develop * refine, test=develop
-
由 Zeng Jinle 提交于
* add fleet api for program pass * turn on apply pass for CI test * fix disable fuse_all_optimizer bug * try to test ci * fix CI * fill unspecified op role * fix fuse_allreduce * add ut to improve coverage * remove useless change * improve c++ coverage * follow some comments * test ir pass pipeline * update doc * reduce ut time again
-
由 liutiexing 提交于
* Split Tracker and WorkQueue * add WorkQueueGroup * add unittest * fix * update * update * fix compile
-
由 WangXi 提交于
-
- 07 9月, 2021 2 次提交
-
-
由 yaoxuefeng 提交于
-
由 ceci3 提交于
-
- 06 9月, 2021 1 次提交
-
-
由 joanna.wozna.intel 提交于
* Add fusion_lstm INT8 PTQ * Correct mkldnn_cache_capacity and enable fc_lstm_fuse_pass only for this test * Change mkldnn_cache_capacity
-
- 03 9月, 2021 1 次提交
-
-
由 wanghuancoder 提交于
* modify gc logic, use new device_event, test=develop * use GenerateDeviceEventFlag, test=develop * refine, test=develop * fix test_standalone_executor.py, test=develop * refine, test=develop
-
- 01 9月, 2021 4 次提交
-
-
由 Thunderbrook 提交于
* merge dense * log level * tensor copy sync * format
-
由 ShenLiang 提交于
* add cache for send_recv * add eval_batch for pipeline * add eval batch for pipelineparallel * add style code
-
由 wanghuancoder 提交于
* modify fetch logic, use D2H Stream, test=develop * refine, test=develop
-
由 QingshuChen 提交于
* support KL label smooth * update UT for KL label_smooth
-
- 31 8月, 2021 2 次提交
-
-
由 Aurelius84 提交于
* polish code * fix unittest on windows * refine pybind interface * support statistic MemSize of AllocatorPool * Replace mutex into atomic
-
由 王明冬 提交于
-
- 30 8月, 2021 3 次提交
-
-
由 chentianyu03 提交于
-
由 ceci3 提交于
* update ernie int8
-
由 Aurelius84 提交于
* Abstract GenerateDeviceEventFlag to shield platforms * Remove get_cuda_flags
-
- 27 8月, 2021 1 次提交
-
-
由 joanna.wozna.intel 提交于
* Add calculation for gru op * Correct the types * Remove mkldnn only * Correct mkldnn ifdef * Remove mkldnn ifdef * Separate mkldnn quantizer test * Correct Windows test * Check different cmake fix * Revert cmake change * Cmake change 2 * Cmake change 3
-