Commit d2f06a5f authored by Brian Pickrell's avatar Brian Pickrell
Browse files

Merge branch 'dynamic_reduce' of...

Merge branch 'dynamic_reduce' of https://github.com/ROCmSoftwarePlatform/AMDMIGraphX into dynamic_reduce
parents 36f76f90 4166593f
...@@ -123,7 +123,7 @@ struct reduce_op : op_name<Derived> ...@@ -123,7 +123,7 @@ struct reduce_op : op_name<Derived>
auto tuned_axes = tune_axes(output_dyn_dims.size()); auto tuned_axes = tune_axes(output_dyn_dims.size());
for(const auto& axis : tuned_axes) for(const auto& axis : tuned_axes)
{ {
output_dyn_dims[axis] = {1, 1}; output_dyn_dims[axis] = {1, 1, 0};
} }
return shape{s.type(), output_dyn_dims}; return shape{s.type(), output_dyn_dims};
...@@ -132,7 +132,7 @@ struct reduce_op : op_name<Derived> ...@@ -132,7 +132,7 @@ struct reduce_op : op_name<Derived>
{ {
auto lens = s.lens(); auto lens = s.lens();
auto tuned_axes = tune_axes(lens.size()); auto tuned_axes = tune_axes(lens.size());
for(auto& axis : tuned_axes) for(const auto& axis : tuned_axes)
{ {
lens[axis] = 1; lens[axis] = 1;
} }
...@@ -146,7 +146,7 @@ struct reduce_op : op_name<Derived> ...@@ -146,7 +146,7 @@ struct reduce_op : op_name<Derived>
const std::vector<T>& in_lens, const std::vector<T>& in_lens,
std::vector<T>& out_lens) const std::vector<T>& out_lens) const
{ {
for(auto axis : tuned_axes) for(const auto& axis : tuned_axes)
{ {
out_lens[axis] = in_lens[axis]; out_lens[axis] = in_lens[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