Commit d8038982 authored by Paul's avatar Paul
Browse files

Format

parent 7702c20d
...@@ -47,9 +47,9 @@ __device__ void generic_binary_layernorm( ...@@ -47,9 +47,9 @@ __device__ void generic_binary_layernorm(
{ {
using reduce_output = reduce::with_axis<Input1, Axis>; using reduce_output = reduce::with_axis<Input1, Axis>;
reduce::block::run<reduce_output>([&](auto, auto r) { reduce::block::run<reduce_output>([&](auto, auto r) {
using value_type = typename Input1::type; using value_type = typename Input1::type;
constexpr auto relements = r.template elements<Input1>(); constexpr auto relements = r.template elements<Input1>();
auto means = r.reduce(op::sum{}, make_array<value_type>(0, 0), [&](auto x1, auto x2) { auto means = r.reduce(op::sum{}, make_array<value_type>(0, 0), [&](auto x1, auto x2) {
auto x = op(x1, x2); auto x = op(x1, x2);
return make_array(x, x * x) / value_type{relements}; return make_array(x, x * x) / value_type{relements};
})(input1, input2); })(input1, input2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment