Skip to content

Commit d4a45ce

Browse files
【CUDA Kernel No.8】fused_seqpool_cvm算子Kernel修复 -part (#75537)
1 parent bc55757 commit d4a45ce

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.
12+
13+
#pragma once
14+
15+
#include <string>
16+
#include <vector>
17+
#include "paddle/phi/backends/gpu/gpu_context.h"
18+
#include "paddle/phi/core/dense_tensor.h"
19+
20+
namespace phi {
21+
namespace fusion {
22+
23+
template <typename T, typename Context>
24+
void FusedSeqpoolCVMCUDAKernel(const Context &dev_ctx,
25+
const std::vector<const DenseTensor *> &x,
26+
const DenseTensor &cvm,
27+
const std::string &pooltype,
28+
float pad_value,
29+
bool use_cvm,
30+
int cvm_offset,
31+
std::vector<DenseTensor *> out);
32+
33+
} // namespace fusion
34+
} // namespace phi

paddle/phi/kernels/fusion/cpu/fused_seqpool_cvm_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_seqpool_cvm_kernel.h"
1516
#include <memory>
1617
#include <vector>
1718

paddle/phi/kernels/fusion/gpu/fused_seqpool_cvm_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_seqpool_cvm_kernel.h"
1516
#include <string>
1617
#include "paddle/phi/backends/gpu/gpu_info.h"
1718
#include "paddle/phi/backends/gpu/gpu_launch_config.h"

0 commit comments

Comments
 (0)