File tree Expand file tree Collapse file tree 4 files changed +36
-3
lines changed Expand file tree Collapse file tree 4 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 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 < string>
18+ #include " paddle/phi/backends/gpu/gpu_context.h"
19+ #include " paddle/phi/core/dense_tensor.h"
20+ #include " paddle/phi/core/kernel_registry.h"
21+
22+ namespace phi {
23+
24+ // AffineChannel CUDA kernel wrapper
25+ template <typename T, typename Context>
26+ void AffineChannelCUDAKernel (const Context& dev_ctx,
27+ const DenseTensor& x_in,
28+ const DenseTensor& scale_in,
29+ const DenseTensor& bias_in,
30+ const std::string& data_layout,
31+ DenseTensor* out);
32+
33+ } // namespace phi
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ #include " paddle/phi/kernels/affine_channel_kernel.h"
1516#include < string>
1617#include < unordered_map>
17-
1818#include " paddle/phi/core/kernel_registry.h"
1919#include " paddle/phi/kernels/funcs/eigen/common.h"
2020
Original file line number Diff line number Diff line change 2020#include < hipcub/hipcub.hpp>
2121namespace cub = hipcub;
2222#endif
23-
2423#include " paddle/phi/backends/gpu/gpu_context.h"
2524#include " paddle/phi/backends/gpu/gpu_primitives.h"
2625#include " paddle/phi/core/kernel_registry.h"
26+ #include " paddle/phi/kernels/affine_channel_kernel.h"
2727
2828namespace phi {
2929
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ #include " paddle/phi/kernels/affine_channel_kernel.h"
1516#include < string>
1617#include < unordered_map>
1718#include < vector>
18-
1919#include " paddle/phi/backends/xpu/enforce_xpu.h"
2020#include " paddle/phi/core/kernel_registry.h"
2121#include " paddle/phi/kernels/funcs/eigen/common.h"
You can’t perform that action at this time.
0 commit comments