Commit 6ed20101 authored by Paul's avatar Paul
Browse files

Format

parent b50d336a
...@@ -46,7 +46,7 @@ template <index_int Axis, ...@@ -46,7 +46,7 @@ template <index_int Axis,
__device__ void generic_binary_layernorm( __device__ void generic_binary_layernorm(
F compute, BinOp op, float eps, Output output, Input1 input1, Input2 input2, Inputs... inputs) F compute, BinOp op, float eps, Output output, Input1 input1, Input2 input2, Inputs... inputs)
{ {
using block = reduce::auto_block<reduce::reduce_elements_with_axis<Input1, Axis>()>; using block = reduce::auto_block<reduce::reduce_elements_with_axis<Input1, Axis>()>;
using reduce_output = reduce::with_axis<Input1, Axis>; using reduce_output = reduce::with_axis<Input1, Axis>;
block::template run<reduce_output>([&](auto, auto r) { block::template run<reduce_output>([&](auto, auto r) {
auto input = r.inner([&](auto x1, auto x2) { return op(x1, x2); })(input1, input2); auto input = r.inner([&](auto x1, auto x2) { return op(x1, x2); })(input1, input2);
......
...@@ -540,16 +540,16 @@ struct lane ...@@ -540,16 +540,16 @@ struct lane
}; };
// TODO: Remove these in the future when they can be selected in the compiler class // TODO: Remove these in the future when they can be selected in the compiler class
template<index_int RElements> template <index_int RElements>
constexpr auto pick_block() constexpr auto pick_block()
{ {
using nlocal = decltype(index{}.max_nlocal()); using nlocal = decltype(index{}.max_nlocal());
if constexpr(RElements < nlocal{}*256) if constexpr(RElements < nlocal{} * 256)
return block{}; return block{};
else else
return block_large{}; return block_large{};
} }
template<index_int RElements> template <index_int RElements>
using auto_block = decltype(pick_block<RElements>()); using auto_block = decltype(pick_block<RElements>());
template <class Input, index_int Axis> template <class Input, index_int Axis>
......
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