kern.cu 1.0 KB
Newer Older
1
/**
2
 * \file dnn/src/cuda/check_non_finite/kern.cu
3 4 5 6 7 8 9 10
 * MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
 *
 * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 */
11
#include "src/common/reduce_helper_device.h"
12 13 14 15 16 17 18 19 20

#include "megdnn/dtype.h"
#include "src/cuda/reduce_helper.cuh"

namespace megdnn {
namespace cuda {

#define COMMA ,

21 22 23 24 25
#define cb(_dtype)                                                      \
    INST_REDUCE(                                                        \
            device_reduce::CheckNonFiniteOp<                            \
                    _dtype COMMA size_t COMMA dt_int32 COMMA dt_int32>, \
            false);
26

27 28 29
cb(dt_float32);
cb(dt_float16);
#undef cb
30
#undef COMMA
M
Megvii Engine Team 已提交
31 32
}  // namespace cuda
}  // namespace megdnn
33 34

// vim: ft=cpp syntax=cpp.doxygen