Skip to content

Commit 7bcfdc9

Browse files
committed
fix
1 parent c9e2f18 commit 7bcfdc9

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#pragma once
16+
17+
#include "paddle/phi/backends/gpu/gpu_context.h"
18+
#include "paddle/phi/core/dense_tensor.h"
19+
#include "paddle/phi/core/kernel_registry.h"
20+
21+
namespace phi {
22+
namespace fusion {
23+
24+
template <typename T, typename Context>
25+
void FusedBiasActKernel(const Context& dev_ctx,
26+
const DenseTensor& x,
27+
const paddle::optional<DenseTensor>& bias,
28+
const paddle::optional<DenseTensor>& dequant_scales,
29+
const paddle::optional<DenseTensor>& shift,
30+
const paddle::optional<DenseTensor>& smooth,
31+
const std::string& act_method,
32+
const std::string& compute_dtype,
33+
float quant_scale,
34+
int quant_round_type,
35+
float quant_max_bound,
36+
float quant_min_bound,
37+
DenseTensor* out);
38+
39+
} // namespace fusion
40+
} // namespace phi

paddle/phi/kernels/fusion/gpu/fused_bias_act_kernel.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include "paddle/phi/kernels/fused_bias_act_kernel.h"
1516
#include "glog/logging.h"
1617
#include "paddle/common/flags.h"
1718
#include "paddle/phi/kernels/fusion/gpu/fused_bias_act_utils.h"

paddle/phi/kernels/fusion/xpu/fused_bias_act_kernel.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include "paddle/phi/kernels/fused_bias_act_kernel.h"
1516
#include "paddle/phi/backends/xpu/enforce_xpu.h"
1617
#include "paddle/phi/backends/xpu/xpu_context.h"
1718
#include "paddle/phi/core/dense_tensor.h"

0 commit comments

Comments
 (0)