Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cuBlasLt Epilogue To Fuse Linear + ReLU|GeLU #39437

Merged
merged 38 commits into from
Mar 7, 2022

Commits on Jan 14, 2022

  1. Configuration menu
    Copy the full SHA
    4c7ee94 View commit details
    Browse the repository at this point in the history
  2. 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).
    mingxu1067 committed Jan 14, 2022
    Configuration menu
    Copy the full SHA
    a82c0a8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    26e6411 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2022

  1. 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).
    mingxu1067 committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    41b701a View commit details
    Browse the repository at this point in the history
  2. 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.
    mingxu1067 committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    6349809 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a0c0f48 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    cb1f790 View commit details
    Browse the repository at this point in the history
  2. GeLU support and EpilogueSingleton

    1. Added GeLU support to fused_gemm_epilogue op.
    2. Added EpilogueSingleton to cache auxiliary pointer.
    3. Added related UTs.
    mingxu1067 committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    f001541 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    51e6a36 View commit details
    Browse the repository at this point in the history
  4. 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.
    mingxu1067 committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    2c24ad7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6919ce7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a65ab08 View commit details
    Browse the repository at this point in the history
  7. 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.
    mingxu1067 committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    1b7541b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ac1a8ca View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2022

  1. Add fused_gemm_epilogue_grad op.

    1. Added fused_gemm_epilogue_grad to support backward epilogue fusion.
    mingxu1067 committed Jan 21, 2022
    Configuration menu
    Copy the full SHA
    9cdf442 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fbda512 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64a43ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0369fb4 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2022

  1. Configuration menu
    Copy the full SHA
    88c9ecb View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2022

  1. Fuse backward of Linear( Act(x))

    1. Added backward fusion pass to Linear( Act(x)).
    2. Added backward fusion pass to Linear(x).
    mingxu1067 committed Jan 26, 2022
    Configuration menu
    Copy the full SHA
    009eea2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a8076a9 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2022

  1. Configuration menu
    Copy the full SHA
    1268d48 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2022

  1. Configuration menu
    Copy the full SHA
    dbed64f View commit details
    Browse the repository at this point in the history
  2. 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.
    mingxu1067 committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    d8a862e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54a8588 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    06f4240 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2022

  1. Merge branch 'develop'

    1. Modified way to get cublasLt handler in device_context to be
    consistent with last changes in develop.
    mingxu1067 committed Feb 10, 2022
    Configuration menu
    Copy the full SHA
    fba452e View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2022

  1. Set Compiling constrains to cuBlasLt

    1. Require CUDA 11.6+
    2. Remove fuse_gemm_epilogue related tests when CUDA < 11.6.
    mingxu1067 committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    fe8a560 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2022

  1. 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.
    mingxu1067 committed Feb 18, 2022
    Configuration menu
    Copy the full SHA
    dcdab08 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2022

  1. Remove EpilogueSingleton

    1. Applied ReserveSpace to replace Epilogue for passing auxiliary
    pointers between FWD and BWD.
    mingxu1067 committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    02c007f View commit details
    Browse the repository at this point in the history
  2. 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.
    mingxu1067 committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    84fd06a View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2022

  1. 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.
    mingxu1067 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    30b20da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1510a96 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a421be8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2768d2a View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2022

  1. Rename name of arguments in fused_gemm_epilogue_op

    1. bias -> Bias.
    2. out -> Out.
    3. reserve_space -> ReserveSpace.
    mingxu1067 committed Mar 1, 2022
    Configuration menu
    Copy the full SHA
    3a27015 View commit details
    Browse the repository at this point in the history
  2. Change EpiloguePassActivationCache as local variable.

    1. Removed singleton in EpiloguePassActivationCache.
    2. Made EpiloguePassActivationCache as an argument to each pass
    functions.
    mingxu1067 committed Mar 1, 2022
    Configuration menu
    Copy the full SHA
    2f23475 View commit details
    Browse the repository at this point in the history
  3. 1 Configuration menu
    Copy the full SHA
    5c47882 View commit details
    Browse the repository at this point in the history