Commit 7135da72 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 973cafd4
...@@ -10,17 +10,16 @@ inline namespace MIGRAPHX_INLINE_NS { ...@@ -10,17 +10,16 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace gpu { namespace gpu {
namespace device { namespace device {
argument scatter(hipStream_t stream, argument result, argument arg0, argument arg1, argument arg2, int64_t axis) argument scatter(
hipStream_t stream, argument result, argument arg0, argument arg1, argument arg2, int64_t axis)
{ {
auto ds = arg0.get_shape(); auto ds = arg0.get_shape();
auto inds = arg1.get_shape(); auto inds = arg1.get_shape();
hip_visit_all(result, arg0, inds)([&](auto output, auto data, auto s1) { hip_visit_all(result, arg0, inds)([&](auto output, auto data, auto s1) {
// hip_visit_all(result, arg0, arg2, ds)([&](auto output, auto data, auto update, auto s) {
auto* output_ptr = device_cast(output.data()); auto* output_ptr = device_cast(output.data());
const auto* data_ptr = device_cast(data.data()); const auto* data_ptr = device_cast(data.data());
gs_launch(stream, ds.elements(), 256)([=](auto i) __device__ { gs_launch(stream, ds.elements(), 256)([=](auto i)
output_ptr[i] = data_ptr[i]; __device__ { output_ptr[i] = data_ptr[i]; });
});
hip_visit_all(arg1, arg2)([&](auto indices, auto update) { hip_visit_all(arg1, arg2)([&](auto indices, auto update) {
const auto* upd_ptr = device_cast(update.data()); const auto* upd_ptr = device_cast(update.data());
const auto* indices_ptr = device_cast(indices.data()); const auto* indices_ptr = device_cast(indices.data());
......
...@@ -10,7 +10,8 @@ inline namespace MIGRAPHX_INLINE_NS { ...@@ -10,7 +10,8 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace gpu { namespace gpu {
namespace device { namespace device {
argument scatter(hipStream_t stream, argument result, argument arg0, argument arg1, argument arg2, int64_t axis); argument scatter(
hipStream_t stream, argument result, argument arg0, argument arg1, argument arg2, int64_t axis);
} // namespace device } // namespace device
} // namespace gpu } // namespace gpu
......
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