"...composable_kernel_rocm.git" did not exist on "611064a13f149a5ef58a8bda338c1adac1936804"
Commit ddb6356b authored by Paul's avatar Paul
Browse files

Formatting

parent c8958d6f
...@@ -44,8 +44,6 @@ hip_tensor_view<T, N> make_hip(tensor_view<T> x) ...@@ -44,8 +44,6 @@ hip_tensor_view<T, N> make_hip(tensor_view<T> x)
return x; return x;
} }
} // namespace device } // namespace device
} // namespace gpu } // namespace gpu
} // namespace MIGRAPHX_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
......
...@@ -43,12 +43,9 @@ void visit_tensor_size(std::size_t n, F f) ...@@ -43,12 +43,9 @@ void visit_tensor_size(std::size_t n, F f)
} }
} }
inline std::size_t tensor_size(const shape& x) inline std::size_t tensor_size(const shape& x) { return x.lens().size(); }
{
return x.lens().size();
}
template<class T> template <class T>
auto tensor_size(const T& x) -> decltype(x.get_shape().lens().size()) auto tensor_size(const T& x) -> decltype(x.get_shape().lens().size())
{ {
return x.get_shape().lens().size(); return x.get_shape().lens().size();
...@@ -59,8 +56,7 @@ auto hip_visit_all(T&& x, Ts&&... xs) ...@@ -59,8 +56,7 @@ auto hip_visit_all(T&& x, Ts&&... xs)
{ {
return [&](auto f) { return [&](auto f) {
visit_tensor_size(tensor_size(x), [&](auto dim) { visit_tensor_size(tensor_size(x), [&](auto dim) {
visit_all(x, visit_all(x, xs...)([&](auto... vs) { f(make_hip<dim>(device_cast(vs))...); });
xs...)([&](auto... vs) { f(make_hip<dim>(device_cast(vs))...); });
}); });
}; };
} }
...@@ -70,8 +66,8 @@ auto hip_vec_visit_all(T&& x, Ts&&... xs) ...@@ -70,8 +66,8 @@ auto hip_vec_visit_all(T&& x, Ts&&... xs)
{ {
return [&](auto f) { return [&](auto f) {
visit_tensor_size(tensor_size(x), [&](auto dim) { visit_tensor_size(tensor_size(x), [&](auto dim) {
visit_all(x, xs...)( visit_all(x,
[&](auto... vs) { f(make_hip<dim>(as_vec<N>(device_cast(vs)))...); }); xs...)([&](auto... vs) { f(make_hip<dim>(as_vec<N>(device_cast(vs)))...); });
}); });
}; };
} }
......
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