"sgl-router/vscode:/vscode.git/clone" did not exist on "1357ab025aaa8f61743044cf1a659f03e6cbb803"
Commit d94118af authored by Paul's avatar Paul
Browse files

Format

parent 5b4e949c
......@@ -10,10 +10,9 @@ template <index_int Axis, class Input, class Output>
__device__ void softmax(Input input, Output output)
{
reduce::block::run<reduce::with_axis<Input, Axis>>([&](auto, auto r) {
auto batch_sum =
r.reduce(op::sum{}, 0, [](auto x) { return migraphx::convert<float>(migraphx::exp(x)); })(input);
r.inner([&](auto& y, auto x) { y = migraphx::exp(x) / batch_sum; })(output,
input);
auto batch_sum = r.reduce(
op::sum{}, 0, [](auto x) { return migraphx::convert<float>(migraphx::exp(x)); })(input);
r.inner([&](auto& y, auto x) { y = migraphx::exp(x) / batch_sum; })(output, input);
});
}
......
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