Commit 8399b302 authored by Paul's avatar Paul
Browse files

Formatting

parent 7dd2cf04
...@@ -11,10 +11,7 @@ inline namespace MIGRAPHX_INLINE_NS { ...@@ -11,10 +11,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace gpu { namespace gpu {
namespace device { namespace device {
argument logsoftmax(hipStream_t stream, argument logsoftmax(hipStream_t stream, argument result, argument arg, int axis)
argument result,
argument arg,
int axis)
{ {
auto lens = result.get_shape().lens(); auto lens = result.get_shape().lens();
...@@ -40,7 +37,7 @@ argument logsoftmax(hipStream_t stream, ...@@ -40,7 +37,7 @@ argument logsoftmax(hipStream_t stream,
for(std::size_t j = 0; j < num_in_batch; ++j) for(std::size_t j = 0; j < num_in_batch; ++j)
{ {
data_idx[axis] = j; data_idx[axis] = j;
output[data_idx] = input[data_idx] - batch_max; output[data_idx] = input[data_idx] - batch_max;
} }
......
...@@ -10,10 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS { ...@@ -10,10 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace gpu { namespace gpu {
namespace device { namespace device {
argument logsoftmax(hipStream_t stream, argument logsoftmax(hipStream_t stream, argument result, argument arg, int axis);
argument result,
argument arg,
int axis);
} // namespace device } // namespace device
} // namespace gpu } // namespace gpu
......
...@@ -15,9 +15,8 @@ shape hip_logsoftmax::compute_shape(const std::vector<shape>& inputs) const ...@@ -15,9 +15,8 @@ shape hip_logsoftmax::compute_shape(const std::vector<shape>& inputs) const
return op.compute_shape({inputs.at(0)}); return op.compute_shape({inputs.at(0)});
} }
argument hip_logsoftmax::compute(context& ctx, argument
const shape&, hip_logsoftmax::compute(context& ctx, const shape&, const std::vector<argument>& args) const
const std::vector<argument>& args) const
{ {
return device::logsoftmax(ctx.get_stream().get(), args[1], args[0], op.axis); return device::logsoftmax(ctx.get_stream().get(), args[1], args[0], op.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