/** * \file dnn/src/common/elemwise/each_mode.inl * MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * * Copyright (c) 2014-2020 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. */ // generated by gen_elemwise_each_mode.py #define MEGDNN_FOREACH_ELEMWISE_MODE_UNARY_FLOAT(cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(RELU, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ABS, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(NEGATE, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ACOS, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ASIN, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(CEIL, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(COS, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(EXP, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(EXPM1, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FLOOR, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(LOG, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(LOG1P, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SIGMOID, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SIN, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(TANH, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FAST_TANH, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ROUND, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ERF, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ERFINV, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ERFC, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ERFCINV, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(H_SWISH, cb) \ #define MEGDNN_FOREACH_ELEMWISE_MODE_UNARY_INT(cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(RELU, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ABS, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(NEGATE, cb) \ #define MEGDNN_FOREACH_ELEMWISE_MODE_BINARY_FLOAT(cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ABS_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ADD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FLOOR_DIV, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MAX, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MIN, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MOD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MUL, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SIGMOID_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SUB, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SWITCH_GT0, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(TANH_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(LT, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(LEQ, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(EQ, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FUSE_ADD_RELU, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(TRUE_DIV, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(POW, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(LOG_SUM_EXP, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FUSE_ADD_TANH, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FAST_TANH_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FUSE_ADD_SIGMOID, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ATAN2, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(H_SWISH_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FUSE_ADD_H_SWISH, cb) \ #define MEGDNN_FOREACH_ELEMWISE_MODE_BINARY_INT(cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ABS_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(ADD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FLOOR_DIV, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MAX, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MIN, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MOD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(MUL, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SIGMOID_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SUB, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SWITCH_GT0, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(TANH_GRAD, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(LT, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(LEQ, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(EQ, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FUSE_ADD_RELU, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SHL, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(SHR, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(RMULH, cb) \ #define MEGDNN_FOREACH_ELEMWISE_MODE_TERNARY_FLOAT(cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(COND_LEQ_MOV, cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(FUSE_MUL_ADD3, cb) \ #define MEGDNN_FOREACH_ELEMWISE_MODE_TERNARY_INT(cb) \ MEGDNN_ELEMWISE_MODE_ENABLE(COND_LEQ_MOV, cb) \