data_kernel.h 1.8 KB
Newer Older
H
hong 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

17
#include "paddle/phi/common/int_array.h"
H
hong 已提交
18 19 20 21 22
#include "paddle/phi/core/dense_tensor.h"

namespace phi {

template <typename T, typename Context>
23
void DataKernel(const Context& ctx,
24 25
                const std::string& name,
                const phi::IntArray& shape,
26 27
                phi::DataType data_type,
                DenseTensor* out);
28 29

template <typename T, typename Context>
H
hong 已提交
30 31 32
void ShadowOutputKernel(const Context& ctx,
                        const DenseTensor& x,
                        DenseTensor* out);
H
hong 已提交
33

34
template <typename T, typename Context>
H
hong 已提交
35 36 37
void ShadowFeedKernel(const Context& ctx,
                      const DenseTensor& x,
                      DenseTensor* out);
38

H
hong 已提交
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
template <typename T, typename Context>
void PrintKernel(const Context& ctx,
                 const DenseTensor& x,
                 int first_n,
                 const std::string& message,
                 int summarize,
                 bool print_tensor_name,
                 bool print_tensor_type,
                 bool print_tensor_shape,
                 bool print_tensor_layout,
                 bool print_tensor_lod,
                 const std::string& print_phase,
                 bool is_forward,
                 DenseTensor* out);

H
hong 已提交
54
}  // namespace phi