Skip to content

Commit 2a967fd

Browse files
committed
resolve conflicts and fix UT bugs.
1 parent 1422b17 commit 2a967fd

9 files changed

Lines changed: 111 additions & 1906 deletions

File tree

paddle/fluid/operators/fused/fused_layernorm_residual_dropout_bias.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,15 +678,15 @@ __global__ __launch_bounds__(THREADS_PER_CTA) void fused_fast_ln_fwd_kernel(
678678
x[it][jt] = static_cast<T>(static_cast<U>(gamma[it][jt]) * tmp +
679679
static_cast<U>(beta[it][jt]));
680680

681-
if (std::is_same<T, int8_t>::value)
681+
if (std::is_same<OutType, int8_t>::value)
682682
x_output[it][jt] = __float2int_rn(static_cast<float>(x[it][jt]) *
683683
quant_in_scale_data);
684684
}
685685
}
686686

687687
#pragma unroll
688688
for (int it = 0, col = c; it < LDGS; it++) {
689-
if (std::is_same<T, int8_t>::value) {
689+
if (std::is_same<OutType, int8_t>::value) {
690690
phi::Store<OutType, VecSize>(
691691
x_output[it], y_ptr + row * ELTS_PER_ROW + col * VecSize);
692692
} else {

paddle/fluid/operators/fused/fused_multi_transformer_int8_op.cu

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
2-
* Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved.
32
43
Licensed under the Apache License, Version 2.0 (the "License");
54
you may not use this file except in compliance with the License.
@@ -12,9 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1211
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1312
See the License for the specific language governing permissions and
1413
limitations under the License. */
15-
// This file has been adapted from FasterTransformer file:
16-
// https://github.com/NVIDIA/FasterTransformer/blob/v4.0/fastertransformer/cuda/masked_multihead_attention.cu
17-
// We add License in the head.
1814

1915
#include "paddle/fluid/operators/fused/attn_gemm_int8.h"
2016
#include "paddle/fluid/operators/fused/fused_multi_transformer_op.h"

0 commit comments

Comments
 (0)