2022-09-16 13:58:57 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "operators/unary.h"
|
|
|
|
|
|
|
|
namespace infini {
|
2024-01-15 11:02:13 +08:00
|
|
|
template <typename T> void softmax_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void relu_kernel(T *input, T *output, size_t num);
|
2024-01-11 15:44:07 +08:00
|
|
|
template <typename T> void silu_kernel(T *input, T *output, size_t num);
|
2024-01-15 11:02:13 +08:00
|
|
|
template <typename T> void sigmoid_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void tanh_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void abs_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void sqrt_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void neg_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void gelu_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void erf_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void hard_sigmoid_kernel(T *input, T *output, size_t num);
|
|
|
|
template <typename T> void hard_swish_kernel(T *input, T *output, size_t num);
|
2022-09-16 13:58:57 +08:00
|
|
|
|
2024-01-15 11:02:13 +08:00
|
|
|
template <typename INPUT, typename OUTPUT>
|
|
|
|
void cast_kernel(INPUT *input, OUTPUT *output, size_t num);
|
2022-09-16 13:58:57 +08:00
|
|
|
|
2024-01-15 11:02:13 +08:00
|
|
|
void unary_kernel(const Operator &_op);
|
2022-09-16 13:58:57 +08:00
|
|
|
|
|
|
|
}; // namespace infini
|