add_relu.cpp 409 Bytes
Newer Older
1
2
#include <migraph/gpu/device/add_relu.hpp>
#include <migraph/gpu/device/nary.hpp>
Paul's avatar
Paul committed
3
4
5
6
7

namespace migraph {
namespace gpu {
namespace device {

8
void add_relu(argument result, argument arg1, argument arg2)
Paul's avatar
Paul committed
9
{
Paul's avatar
Paul committed
10
    nary(std::move(result), std::move(arg1), std::move(arg2))(
Paul's avatar
Paul committed
11
        [](auto x, auto y) { return std::max<decltype(x + y)>(0, x + y); });
Paul's avatar
Paul committed
12
13
14
15
16
}

} // namespace device
} // namespace gpu
} // namespace migraph