1. 28 10月, 2021 4 次提交
    • P
      Cherry-pick-36556: add paddle.version.cuda and paddle.version.cudnn API (#36556) (#36795) · 05b8630f
      pangyoki 提交于
      * add paddle.version.cuda and paddle.version.cudnn API
      
      * fix little bug
      
      * fix bug
      
      * add doc string
      
      * fix mkdir error
      
      * fix windows path
      
      * fix new paddle/version path
      
      * fix unittest
      
      * fix format
      05b8630f
    • H
      [Cherry-pick] Enable CTC grad compute on GPU (#36780) · 8ede9e6f
      Hui Zhang 提交于
      * Revert "Align CTC grad scale same with ESPNet (#34729)"
      
      This reverts commit 10f9644c.
      
      * ctc grad compute on gpu
      8ede9e6f
    • L
      Fix fused_attention_op and fused_feedforward_op bug when pre_layer_norm is false. (#36793) (#36816) · ae592233
      Li Min 提交于
      * Fix bug when pre_layer_norm is false.
      ae592233
    • X
      [Cherry-pick]FFT function enhancements and bugfixes (#36537) · 11b9f5f9
      Xiaoxu Chen 提交于
      * update fft api path (#36219)
      
      * update fft api path
      * add sample code for ihfft2
      Co-authored-by: Nchenfeiyu <chenfeiyu@baidu.com>
      
      * fix fft axis (#36321)
      
      fix: `-1` is used when fft's axis is `0`
      
      * use unified external error message for cufft api (#36114)
      
      * fft: modify sample code result (#36325)
      
      * dynamic load mkl as a fft backend when it is avaialble and requested (#36414)
      
      * add rocm support for fft api (#36415)
      
      * move signal apis
      
      * move fft and signal API path (#2)
      
      * move signal apis
      
      * move fft.py and signal.py to paddle/, fix typos
      
      * fix relative imports from fft.py and signal.py
      
      * fix typos in signal.py (#3)
      
      * move signal apis
      
      * move fft.py and signal.py to paddle/, fix typos
      
      * fix relative imports from fft.py and signal.py
      
      * fix typos
      
      * disable Cache when CUFFT_VERSION >= 10200 (#4)
      
      * move signal apis
      
      * move fft.py and signal.py to paddle/, fix typos
      
      * fix relative imports from fft.py and signal.py
      
      * fix typos
      
      * Add LRUCache for fft plans
      
      * add LRUCache for cuff and hipfft (#5)
      
      * move signal apis
      
      * move fft.py and signal.py to paddle/, fix typos
      
      * fix relative imports from fft.py and signal.py
      
      * fix typos
      
      * WIP: add cache
      
      * delete move constructor and operator= for CuFFTHandle and FFTConfig
      
      * remove log from CuFFTHandle and FFTConfig
      
      * add lrucache for fft rocm backend
      
      * disable LRUCache when CUFFT_VERSION >= 10200
      
      * disbale copy and move for hipFFTHandle; format code
      Co-authored-by: NXiaoxu Chen <chenxx_id@163.com>
      
      * remove debug message of cufftHandler
      
      * roll_op: support Tensor as input for shifts (#36727)
      
      * fix fftshift/ifftshift on static mode
      
      * update roll_op version
      
      * add more test cases for fftshift/ifftshift
      Co-authored-by: Nzhiboniu <31800336+zhiboniu@users.noreply.github.com>
      Co-authored-by: Nchenfeiyu <chenfeiyu@baidu.com>
      Co-authored-by: LJQ️ <33169170+lijiaqi0612@users.noreply.github.com>
      11b9f5f9
  2. 27 10月, 2021 3 次提交
  3. 26 10月, 2021 14 次提交
    • W
    • B
      fix wrong trt dim when input dim is 2 (#36614) (#36732) · da6e5143
      baoachun 提交于
      * fix wrong trt dim when input dim is 2
      
      * update leaky_relu and instance_norm converter unit test
      
      * add instance_norm input dim check
      da6e5143
    • W
      [Paddle-Inference]Add MatmulV2ToMatmul convert Pass, fix (matmul_v2, matmul,... · 30ce925c
      Wangzheee 提交于
      [Paddle-Inference]Add MatmulV2ToMatmul convert Pass, fix (matmul_v2, matmul, mul) convert pass, fix (matmul, mul) op_teller (#36652) (#36737)
      
      30ce925c
    • S
      [Cherry-pick] Add FasterTokenizer Operator (#36716) · edff5b79
      Steffy-zxf 提交于
      * Add FasterTokenizer Operator (#34491)
      
      Add Tokenizer related functionalities for Transformer model in order that the process of training and predicting is consistent.
      
      * support the text string as an input Tensor
      * support the "VOCAB"unordered_map<wstring, int> as an input Tensor to lookup tokens
      * Tokenizer used for BERT. This tokenizer applies an end-to-end, text string to wordpiece tokenization.
      * It first applies basic tokenization, followed by wordpiece tokenization.
      
      * optimize fast tokenizer
      
      * remove const_cast
      Co-authored-by: Nzhoushunjie <zhoushunjie@baidu.com>
      Co-authored-by: Nwawltor <fangzeyang0904@hotmail.com>
      edff5b79
    • Z
      [cherry pick] add op: fused_feedforward(backward) (#36730) · 76c1bae1
      zhangkaihuo 提交于
      * add op: fused_feedforward(backward) (#35611)
      
      这个PR是fused_feedforward反向的代码
      
      相关kernel实现:fused_dropout_act_bias, fused_residual_dropout_bias, fused_layernorm_residual_dropout_bias
      
      fused_feedforward是一个融合算子,该算子对transformer模型的feed forward层的算子进行融合和封装,使得前端只呈现一个接口,通过融合减少部分访存和kernel launch的时间,以此提升性能。
      
      * Move fused_attention and fused_feedforward functional api path to incubate (#36704)
      
      将 #35905 和 #35843 PR中新增的的python api接口移到incubate目录下。
      76c1bae1
    • H
      [cherry-pick]Support FP16 in HybridParallel and Fix bugs in HybridOptimizer (#36707) · 5b357e02
      Haohongxiang 提交于
      * fix bugs in HybridParallelClipGrad of hybrid_parallel_optimizer (#36237)
      
      * fix bugs in HybridParallelClipGrad of hybrid_parallel_optimizer
      
      * update
      
      * update
      
      * fix bugs in mp_layers、pp_layers and HybridParallelClipGrad (#36144)
      
      * fix calling bug of HybridParallelClipGrad
      
      * fix bugs of HybridParallelClipGrad
      
      * add unittest of pp with HybridParallelClipGrad
      
      * fix bugs in mp_layers.py
      
      * update
      
      * fix bugs in pp_layers.py
      
      * update
      
      * [HybridParallel]Rebuild code for pipeline (#36396)
      
      * add no_sync for parameters sync
      
      * add pipeline for moe
      
      * [HybridParallel]Support fp16 in dygraph hybrid parallel (#36420)
      
      * [HybridParallel]Support fp16 in dygraph hybrid parallel
      
      * update
      
      * update
      
      * update for recompute
      
      * add unittest of pp+fp16
      
      * add unittest of recompute+fp16
      
      * update
      
      * modify ut
      
      * modify ut of cond (#36475)
      
      * fix bugs of ClipGradByGlobalNorm in HybridParallel (#36555)
      
      * fix bugs of ClipGradByGlobalNorm
      
      * add unittests
      
      * add unittests
      
      * [HybridParallel]fix bug of check_inf in fleet_base.py (#36651)
      
      * fix bug of check_inf
      
      * fix allreduce
      
      * support ClipGradByGlobalNorm in sharding (#36012)
      
      * support ClipGradByGlobalNorm in sharding
      
      * support ClipGradByGlobalNorm in sharding
      
      * test=allcase
      
      * Update test_linalg_cond.py
      
      * Update hybrid_parallel_util.py
      
      * Update hybrid_parallel_util.py
      Co-authored-by: NShenLiang <1422485404@qq.com>
      Co-authored-by: Nzhaoyingli <86812880+zhaoyinglia@users.noreply.github.com>
      5b357e02
    • Z
      [cherry-pick]add op: fused_feedforward(forward) (#36729) · 77034fc3
      zhangkaihuo 提交于
      This is a fusion operator to compute feed forward layer in transformer model architecture.
      77034fc3
    • F
      Pool3d 2.0 (#36545) (#36721) · dfda193f
      feng_shuai 提交于
      dfda193f
    • S
      Add bincount op (#36317) (#36709) · 610a810c
      smallv0221 提交于
      * Add bincount op
      
      * upload cpu version
      
      * fix unitest
      
      * fix unittest
      
      * fix unittest
      
      * fix en doc
      
      * add more test
      
      * fix en doc
      
      * add more test case
      
      * fix test
      
      * fix input vailidation
      
      * fix input check
      
      * fix unittest
      
      * fix test
      
      * fix en doc
      
      cherry-pick
      610a810c
    • Y
      [Cherry-pick] Add the forward QR operator (#36627) · 616ce203
      Yulong Ao 提交于
      616ce203
    • X
      Support various length support for SelectedRows in GLOO::AllGather (#36637) (#36722) · fced11bd
      xiongkun 提交于
      Support various length support for SelectedRows in GLOO::AllGather (#36637)
      
          In cpu parallel using gloo, add various length support for SelectedRows
      fced11bd
    • H
      cherry pick CrossEntropy's bug fix (#36647) · 32fe5a49
      HydrogenSulfate 提交于
      32fe5a49
    • L
      [cherry-pick-2.2] Fused attention op forward (#35905) (#36708) · d2be870a
      Li Min 提交于
      功能:本PR的目标是提高attention模块的计算性能。
      为了减少框架层对op的调度开销,本PR通过在C++层手动实现attention模块,对外提供attention 大op;
      为了减少防存开销,本PR采取了两种优化方法:
      (1)在q,k,v计算时通过共享输入X,将该处的gemm,transpose和bias add从三次调用减少为一次;
      (2)使用kernel融合优化技术,在不同cuda kernel之间通过寄存器传输数据;
      d2be870a
    • X
      [cherry-pick] Support CPU Parallel in DataParallel Interface by GLOO to speed... · beb920cd
      xiongkun 提交于
      [cherry-pick] Support CPU Parallel in DataParallel Interface by GLOO to speed up training (#35745) (#36605)
      
      * User specified backend (#35745)
      
      * remove tensordot
      beb920cd
  4. 25 10月, 2021 8 次提交
  5. 24 10月, 2021 1 次提交
    • J
      Add viterbi decode (#35778) (#36615) · 1906c746
      Jack Zhou 提交于
      * add viterbi decode cpu kernel
      
      * add viterbi decoder api in paddle.text
      
      * add a data buffer once to avoid create many small pieces of data buffer frequently
      
      * fix viterbi max_seq_length bug
      
      * fix seq_len=1 bug
      
      * fix device context
      
      * move split out of for loop
      
      * remove INVERSE_SUB
      
      * remove 2 GET_CAST_MASK
      
      * remove 1 loop
      
      * remove Functor
      
      * add to_static deploy code
      
      * use MAX_FUNC instead of ELE_MAX
      
      * add MaxFunctor
      
      * impl max_func
      
      * remove MaxFunctor
      
      * remove cast op
      
      * use REGISTER_OP_WITHOUT_GRADIENT
      
      * add viterbi cuda kernel
      
      * add FIX_BLOCKDIM_CASE macro
      
      * add MKL add, mul; add get data mask
      
      * add arange mkl impl
      
      * add CPU Argmax
      
      * add cpu gather
      
      * use EXECUTE_MKL_ELEMENT_BINARY_OP instead of some ADD, MUL
      
      * use SameDimsBinaryOP instead of EXECUTE_MKL_ELEMENT_BINARY_OP
      
      * use SAME_DIMS_ELEMENT_BINARY_OP
      
      * add SimpleBroadcastBinaryOP
      
      * use int instead of int64_t to accelerate
      
      * optimize SimpleBroadcastBinaryOP
      
      * optimize SimpleBroadcastBinaryOP
      
      * optimize performance in both single thread and multithread situation
      
      * remove useless line
      
      * remove useless code
      
      * add CREATE_TENSOR_BUFFER macro
      
      * add INIT_REQUIRED_TENSOR macro
      
      * add comment
      
      * fix windows ci
      
      * add viterbi unittest
      
      * remove cuda add functor
      
      * remove cuda equal
      
      * remove a template function
      
      * fix windows ci
      
      * fix windows dtype
      
      * remove some template instance
      
      * remove useless header file
      
      * remove some blockdim
      
      * remove transpose impl
      
      * accelerate cpu performance on single thread situation
      
      * viterbi_decode->crf_decode
      
      * rename crf params name
      
      * add viterbi api test
      
      * remove useless import
      
      * add enable_static
      
      * use viterbi decoder
      
      * fix viterbi len=1
      
      * fix  viterbi unittest
      
      * remove useless comments
      
      * reconstruct viterbi decode
      
      * remove ADD,SUB,MUL structure
      
      * fix coverage
      
      * remove CREATE_TENSOR
      
      * add name args
      
      * crf.py->ops.py; with_start_stop_tag->include_start_end_tag
      
      * update crf_decode en docs
      
      * fix viterbi decode en docs
      
      * fix some review comments
      
      * add FIXED_BLOCK_DIM_CASE in cuda
      
      * push_back->emplace_back
      
      * crf_decode->viterbi_decode; include_start_end_tag->include_bos_eos_tag
      
      * paddle.text.ops.viterbi_decode->paddle.text.viterbi_decode
      
      * fix viterbi_decode en docs
      1906c746
  6. 21 10月, 2021 2 次提交
  7. 20 10月, 2021 2 次提交
  8. 19 10月, 2021 1 次提交
    • L
      [cherry-pick]Add sparse attention cherrypick (#36447) · 36edb0e1
      Liu-xiandong 提交于
          The code of this PR can only support CUDA 11.2. Currently, CI does not have GPU with CUDA 11.2 , and all tests will be skipped automatically.
      
          The new OP is paddle._C_ops.sparse_attention. Regarding the work of the python API, it will be resolved in a follow-up PR.
      
          The code of this PR lacks tests on dynamic graphs and static graphs, and will be added in subsequent PRs.
      36edb0e1
  9. 18 10月, 2021 1 次提交
  10. 15 10月, 2021 1 次提交
  11. 13 10月, 2021 1 次提交
  12. 12 10月, 2021 1 次提交
  13. 11 10月, 2021 1 次提交