1. 30 3月, 2023 1 次提交
    • H
      register fluid kerenls to phi [part 1] (#52014) · 93d01787
      huangjiyi 提交于
      * update assign_pos
      
      * update attention_lstm
      
      * update barrier
      
      * update batch_fc
      
      * update beam_search
      
      * update beam_search_decode
      
      * update bilateral_slice
      
      * fix bug
      
      * Handle Structure kernel for InterpreterCore::RunOperator
      
      * fix bug
      
      * fix rocm compile
      
      * fix rocm compile
      
      * Revert "fix rocm compile"
      
      * test
      
      * revert test and update cmake
      
      ---------
      Co-authored-by: Nchenruibiao <chenruibiao@baidu.com>
      93d01787
  2. 29 3月, 2023 1 次提交
    • H
      fix Kunlun-KP-Build (#52188) · 4f74656d
      huangjiyi 提交于
      * fix kp compile
      
      * test
      
      * Revert "test"
      
      This reverts commit 3a1cbfaa0f23e6e06d3dcd8d0b0c28aa63a98e70.
      
      * update copyright
      
      * update cmake
      
      * update cmake
      
      * update cmake
      
      * update cmake
      4f74656d
  3. 23 3月, 2023 1 次提交
  4. 08 2月, 2023 1 次提交
    • Y
      [PHI]Unify Fluid and PHI kernel (#49328) · e92e3aab
      YuanRisheng 提交于
      * unify_kernel
      
      * fix compile bugs
      
      * modify macro name
      
      * perfect code according comment
      
      * fix compile bugs
      
      * fix compile bugs
      
      * fix ci bugs
      
      * fix ci bug
      
      * fix ci bugs
      
      * fix ci bugs
      
      * modify code according comment
      
      * rm conv_fusion_op
      e92e3aab
  5. 03 2月, 2023 1 次提交
  6. 17 1月, 2023 1 次提交
    • Y
      [PHI]Change feed_op to phi kernel (#49116) · f7f1dc03
      YuanRisheng 提交于
      * change feed_op to phi kernel
      
      * fix ci bugs
      
      * fix build bugs
      
      * fix ci bugs
      
      * fix compile bugs
      
      * fix ci bugs
      
      * perfect code
      
      * perfect comment code
      
      * fix install bugs
      
      * modify code according comment
      
      * remove visitor in feed_op
      
      * modify according comment
      
      * perfect code according comment
      
      * add infershape
      
      * fix py3 bugs
      
      * fix getexpected kernel type
      
      * fix getexpected kernel type
      
      * fix ci bugs
      
      * add registry for custom device
      
      * fix py3 bugs
      
      * fix floating point error
      
      * fix py3 test bugs
      f7f1dc03
  7. 12 12月, 2022 1 次提交
  8. 20 10月, 2022 2 次提交
  9. 14 10月, 2022 1 次提交
  10. 11 10月, 2022 1 次提交
  11. 22 9月, 2022 1 次提交
    • S
      [PHI] Migrate gelu kernels (#45596) · 567e2fc8
      Sławomir Siwek 提交于
      * gaussian random
      
      * mkldnn to onednn renaming
      
      * fix merge conflicts
      
      * remove fluid code
      
      * onednn renaming
      
      * gelu fwd
      
      * sort activations
      
      * gelu gradient
      
      * remove unused macros
      
      * merge conflicts
      
      * fix merge conflicts
      
      * remove extra contraint from gelu op
      567e2fc8
  12. 05 8月, 2022 1 次提交
    • Y
      [MKLDNN]Move mkldnn activation kernel to phi (#44365) · 2dfa88d2
      YuanRisheng 提交于
      * move mkldnn activation kernel
      
      * fix compile bugs
      
      * fix compile bugs
      
      * deal with conflict
      
      * fix compile bugs
      
      * fix windows compile bugs
      
      * mkldnn unittest fix
      
      * change mutable to alloc
      
      * fix unittest bugs
      
      * modify code according comment
      2dfa88d2
  13. 14 6月, 2022 1 次提交
  14. 04 6月, 2022 1 次提交
  15. 18 5月, 2022 1 次提交
  16. 17 5月, 2022 1 次提交
  17. 28 3月, 2022 1 次提交
  18. 08 3月, 2022 1 次提交
  19. 07 3月, 2022 1 次提交
    • M
      cuBlasLt Epilogue To Fuse Linear + ReLU|GeLU (#39437) · 2a3d9eca
      Ming-Xu Huang 提交于
      * Added cuBlasLtHandle_t to device context.
      
      * Added fused_gemm_epilogue op.
      
      1. Added fused_gemm_epilogue op to leverage cuBlastLt Epilogue.
      2. Support fusion Act(X*Y + bias), X'dims >=2 and Y'dims shoule be 2.
      2. Act currently only be supported ReLU. (Will add GeLU in the future).
      
      * Added UT to fused_gemm_epilogue op.
      
      * Added LinearAct Pattern
      
      1. Added LinearAct into graph_pattern_detector.* to define (2.)'s
      pattern.
      2. LinearAct is used to detect act(element_add(matmul_v2(x, w), bias)).
      3. act currently only support ReLU (Will support GeLU in the future).
      
      * Added FuseGemmEpiloguePass
      
      1, Added FuseGemmEpiloguePass to handle nn.Linear + Act{ReLU}
      fusion (GeLU will be supported in the future).
      2. Only support matmul_v2 from nn.Linear.
      
      * Added pybind to BuildStrageter.fuse_gemm_epilogue_.
      
      * Added UT for fuse_gemm_epilogue_pass.
      
      * GeLU support and EpilogueSingleton
      
      1. Added GeLU support to fused_gemm_epilogue op.
      2. Added EpilogueSingleton to cache auxiliary pointer.
      3. Added related UTs.
      
      * Rename cublaslt_epilogue_opto gemm_epilogue_op.*.
      
      * Added both train and infer pattern to LinearAct.
      
      1. Added support of fwd graph with grap_ops linking to LinearAct.
      2. Added related changes to fuse_gemm_epilogue_pass for above
      modification.
      
      * Changed CUDA requirement from 11.4 to 11.6 for fuse_gemm_epilogue_pass.
      
      * Added identity activation support to gemm_epilogue_op.
      
      * Added Linear Fusion (matmul_v2 + ele_add)
      
      1. Added matmul_v2 + ele_add pattern to LinearActPattern.
      2. Added matmul_v2 + ele_add support to fuse_gemm_epilogue_pass.
      
      * Rename gemm_epilogue_op.* to fused_gemm_epilogue_op.*
      
      * Add fused_gemm_epilogue_grad op.
      
      1. Added fused_gemm_epilogue_grad to support backward epilogue fusion.
      
      * Add UTs to fused_gemm_epilogue_grad_op.
      
      * Change attribute name in fused_gemm_epilogue_grad_op for clearing.
      
      * Allow DX and DBias be dispensable to fused_gemm_epilogue_grad op.
      
      * Added ElementwiseAdd+Matmul+Act graph pattern detection.
      
      * Fuse backward of Linear( Act(x))
      
      1. Added backward fusion pass to Linear( Act(x)).
      2. Added backward fusion pass to Linear(x).
      
      * Added UTs to backward fusion of Linear(Act(x)).
      
      * Complete document of arguments to fused_gemm_epilogue_op.
      
      * Made arguments of some functions pass by reference.
      
      * Modify code with review comments.
      
      1. Made arguments of some function pass by reference.
      2. Removed redundant code.
      3. Followed Google code style to change code.
      
      * Made 'const' code style be consistent
      
      * Fixed random seed of python UTs.
      
      * Set Compiling constrains to cuBlasLt
      
      1. Require CUDA 11.6+
      2. Remove fuse_gemm_epilogue related tests when CUDA < 11.6.
      
      * Code Reivew from Paddle
      
      1. Changed arguments name is_first_gemm to without_x_gradient for
      clearing.
      2. Applied PADDLE_THROW in fused_gemm_epilogue_op.
      
      * Remove EpilogueSingleton
      
      1. Applied ReserveSpace to replace Epilogue for passing auxiliary
      pointers between FWD and BWD.
      
      * Fix a logical error and enhance UTs.
      
      1. Added act op count checking in UTs.
      2. Fix issue to fuse backward or ReLU(Linear(X)).
      3. TODO: solve GELU fusion issues.
      
      * Fix Linear and GeLU fusion issues.
      
      1. Modified graph_detech_pattern to fit with both linear wiht gelu or
      relu.
      2. Modified data range in Uts to allow negative values.
      
      * Removed fused_gemm_epilogue_op.h.
      
      * Rename namespace pten to phi.
      
      * Rename name of arguments in fused_gemm_epilogue_op
      
      1. bias -> Bias.
      2. out -> Out.
      3. reserve_space -> ReserveSpace.
      
      * Change EpiloguePassActivationCache as local variable.
      
      1. Removed singleton in EpiloguePassActivationCache.
      2. Made EpiloguePassActivationCache as an argument to each pass
      functions.
      2a3d9eca
  20. 28 2月, 2022 1 次提交
  21. 23 2月, 2022 1 次提交
  22. 14 2月, 2022 1 次提交
  23. 29 1月, 2022 1 次提交
    • L
      Add xpu2 compiler (#37254) · 92da5055
      Liu-xiandong 提交于
      * Add XPU compiler for paddle, test=develop
      
      * clean code
      
      * clean useless code
      
      * clean useless code
      
      * clean useless code
      
      * test
      
      * add include path
      
      * use clang compiler
      
      * xpu2.cmake
      
      * XPU2 compiler passed
      
      * update
      
      * update after pten
      
      * combination the WITH_XPU and WITH_XPU2
      
      * update the fuse operation in WITH_XPU and WITH_XPU2
      
      * update
      
      * update
      
      * update
      
      * fix the merge error
      
      * update
      
      * update the code
      
      * update the code
      
      * add run_kp_kernel flag
      
      * update
      
      * update
      
      * fix prepared type_ bug
      
      * clean and update the code
      
      * reset the kernel_primitives
      
      * update
      
      * clean the code
      
      * delete useless comment
      
      * fix the bug in WITH_XPU
      
      * update
      
      * update
      
      * modify the abi
      
      * delete some useless code
      
      * Parameter automation in xpu compilation
      
      * Parameter automation in xpu compilation
      
      * delete kps in cmake
      
      * delete useless comment
      
      * clean the code
      
      * clean the code
      92da5055
  24. 26 1月, 2022 1 次提交
    • L
      [pten] remove deprecated fluid op kernel for pten (#38842) · 3ab9aef1
      Leo Chen 提交于
      * update cmake file to remove fluid kernel
      
      * add pten declaration.h to where pybind.h used
      
      * fix sync_bn and tensorrt_engine
      
      * refine detection_library
      
      * fix interpreter_core
      
      * support eager legacy
      
      * fit eager legacy for pten
      
      * fall back to cpu if not found kernel
      
      * fix compile problem
      
      * fix compile problem
      
      * refine fallback logic
      
      * fit operator.run()
      
      * fix xpu compile
      
      * fit for new_exec
      
      * add REGISTER_OP_WITHOUT_GRADIENT
      
      * un-cache pt_kernel_context
      
      * fix compile
      
      * fix cudnn
      
      * fix compiling with on_infer
      
      * fix mkldnn
      
      * fix isfinite_v2
      
      * fix xpu problem
      
      * fix op_device
      
      * refine fallback for xpu
      
      * fix xpu compile
      
      * merge develop
      
      * refine code format
      
      * fix compile
      
      * fix compile
      
      * add data_transfer
      
      * fix PreparePtenData
      
      * fix cpu context
      
      * merge develop
      
      * fix compile
      
      * fix error device context
      
      * fix xpu
      
      * fix dev_ctx
      3ab9aef1
  25. 10 1月, 2022 1 次提交
    • H
      Add gpu kernel for new api : linalg.lstsq (#38621) · 405103d8
      Haohongxiang 提交于
      * add lstsq gpu kernel
      
      * update
      
      * add docs_en
      
      * modify ut
      
      * fix bugs
      
      * modify example in docs_en
      
      * remove lstsq_op.cu from ROCM cmake
      
      * modify docs_en
      
      * modify docs_en
      
      * modify docs_en
      
      * remove unneccessary TensorCopy
      405103d8
  26. 30 12月, 2021 1 次提交
  27. 24 12月, 2021 1 次提交
  28. 20 12月, 2021 1 次提交
  29. 27 10月, 2021 1 次提交
    • H
      add paddle.linalg.eigvalsh API (#35615) · 9f9ed3ae
      huangjun12 提交于
      * add eigvalsh with is_test
      
      * add eigvalsh op
      
      * fix backward bug
      
      * forward and backward, float and complex, unittest
      
      * remove eigvalsh_helper.h
      
      * remove changes of cusolver.h
      
      * fix unittest
      
      * fix unittest bug
      
      * update code following eigh
      
      * fix test
      
      * update lapack
      
      * pull develop
      
      * update funcor
      
      * fix unittest bug
      
      * fix details
      
      * add tensor_method_func
      
      * fix notes
      9f9ed3ae
  30. 25 10月, 2021 2 次提交
    • T
      add some ops to train ssd on kunlun (#36407) · 50778ad6
      TTerror 提交于
      * add some ops to train ssd on kunlun
      
      * add some ops to train ssd on kunlun
      
      * add some ops to train ssd on kunlun
      
      * update cast op unittest
      
      * update cast op unittest
      
      * update cast op unittest
      
      * update xpu cmake
      
      * update cast unittest
      50778ad6
    • Z
      add op: fused_feedforward(forward) (#35843) · b18cbfb2
      zhangkaihuo 提交于
      这个PR只包含fused_feedforward前向的代码。
      
      相关kernel实现:fused_dropout_act_bias, fused_residual_dropout_bias, fused_layernorm_residual_dropout_bias
      
      fused_feedforward是一个融合算子,该算子对transformer模型的feed forward层的算子进行融合和封装,使得前端只呈现一个接口,通过融合减少部分访存和kernel launch的时间,以此提升性能。
      b18cbfb2
  31. 22 10月, 2021 1 次提交
    • L
      Fused attention op forward (#35905) · d4906214
      Li Min 提交于
      功能:本PR的目标是提高attention模块的计算性能。
      为了减少框架层对op的调度开销,本PR通过在C++层手动实现attention模块,对外提供attention 大op;
      为了减少防存开销,本PR采取了两种优化方法:
      (1)在q,k,v计算时通过共享输入X,将该处的gemm,transpose和bias add从三次调用减少为一次;
      (2)使用kernel融合优化技术,在不同cuda kernel之间通过寄存器传输数据;
      d4906214
  32. 19 10月, 2021 1 次提交
    • Y
      [paddle.linalg.qr] Add the Qr Operator (#35742) · 34d785c2
      Yulong Ao 提交于
      * Add QR decomposition op
      
      * Change codes to adapt to new svd_helper
      
      * Update linalg.py
      
      Restore the deleted comma
      
      * Restore the deleted line
      
      * Update linalg.py
      
      * Update linalg.py
      
      * Improve the qr code by reviews
      
      * Update QR based on CI results
      
      * Update qr doc, test=document_fix
      
      * Change unsafe and ill-formed codes
      34d785c2
  33. 14 10月, 2021 1 次提交
  34. 28 9月, 2021 1 次提交
  35. 16 9月, 2021 1 次提交
  36. 09 9月, 2021 1 次提交
    • 0
      Add matrix_rank Op and it's GPU and CPU kernel (#34823) · eb1fbf12
      0x45f 提交于
      * init matrix_rank op, add matrix_rank CPU code and test
      
      * add GPU kernel, remove svd_eigen.h
      
      * add CPU kernel when tol is tensor
      
      * add cpu and gpu code when tol is tensor
      
      * fix CI-ROCM error
      
      * add matrix_rank API describe, fix PR-CI-Py3 error
      
      * fix PR-CI-Windows error, add matrix_rank API test
      
      * delete useless comments
      
      * fix review
      
      * add my code in svd_helper.h
      
      * update doc commets
      
      * remove spaces
      eb1fbf12
  37. 02 9月, 2021 1 次提交
    • X
      Add SVD Op and it's GPU and CPU kernel (#34953) · 7e5fb462
      xiongkun 提交于
      * Add SVD Op and it's GPU and CPU kernel
      
      * Remove CUDAPlace in test_svd_op, make the test available in CPU package
      
      * modfity the file
      
      * fix windows bug/ fix ROCM / fix test timeout
      
      * for pass the CIs
      
      * improve error report
      
      * for code review
      
      * some modification to test_svd_op
      
      * change python code style
      
      * expose the svd interface for document
      7e5fb462
  38. 16 6月, 2021 1 次提交