Commit ee877777 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 8724242e
...@@ -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 {
void logsoftmax(hipStream_t stream, void logsoftmax(hipStream_t stream, const argument& result, const argument& arg, int axis)
const argument& result,
const argument& arg,
int axis)
{ {
auto lens = result.get_shape().lens(); auto lens = result.get_shape().lens();
......
...@@ -12,10 +12,7 @@ inline namespace MIGRAPHX_INLINE_NS { ...@@ -12,10 +12,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace gpu { namespace gpu {
namespace device { namespace device {
void softmax(hipStream_t stream, void softmax(hipStream_t stream, const argument& result, const argument& arg, int axis)
const argument& result,
const argument& arg,
int axis)
{ {
auto lens = result.get_shape().lens(); auto lens = result.get_shape().lens();
auto batch_lens = lens; auto batch_lens = lens;
......
...@@ -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 {
void logsoftmax(hipStream_t stream, void logsoftmax(hipStream_t stream, const argument& result, const argument& arg, int axis);
const argument& result,
const argument& arg,
int axis);
} // namespace device } // namespace device
} // namespace gpu } // namespace gpu
......
...@@ -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 {
void softmax(hipStream_t stream, void softmax(hipStream_t stream, const argument& result, const argument& arg, int axis);
const argument& result,
const 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
{ {
device::logsoftmax(ctx.get_stream().get(), args.back(), args.front(), op.axis); device::logsoftmax(ctx.get_stream().get(), args.back(), args.front(), op.axis);
return args.back(); return args.back();
......
...@@ -37,9 +37,7 @@ shape hip_softmax::compute_shape(const std::vector<shape>& inputs) const ...@@ -37,9 +37,7 @@ shape hip_softmax::compute_shape(const std::vector<shape>& inputs) const
return op.compute_shape({inputs.at(0)}); return op.compute_shape({inputs.at(0)});
} }
argument hip_softmax::compute(context& ctx, argument hip_softmax::compute(context& ctx, const shape&, const std::vector<argument>& args) const
const shape&,
const std::vector<argument>& args) const
{ {
device::softmax(ctx.get_stream().get(), args.back(), args.front(), op.axis); device::softmax(ctx.get_stream().get(), args.back(), args.front(), op.axis);
return args.back(); return args.back();
......
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