Commit ec31c597 authored by Paul's avatar Paul
Browse files

Fix tidy warnings

parent 46653e67
......@@ -223,8 +223,9 @@ auto visit_all(const std::vector<T>& x)
s.visit_type([&](auto as) {
using type = typename decltype(as)::type;
std::vector<tensor_view<type>> result;
for(const auto& y : x)
result.push_back(make_view(y.get_shape(), as.from(y.data())));
std::transform(x.begin(), x.end(), std::back_inserter(result), [&](const auto& y) {
return make_view(y.get_shape(), as.from(y.data()));
});
v(result);
});
};
......
......@@ -70,12 +70,10 @@ void nary_broadcast_vec_impl(
auto bidx = ((i * vec_size) % bdim_next_stride) / bdim_stride;
auto b = bp[bidx];
auto out = output.data()[i];
pack(inputs.data()[i]...)([&](auto... xs) __device__ {
for(std::size_t j = 0; j < vec_size; j++)
{
out[j] = f(xs[j]..., b);
}
});
for(std::size_t j = 0; j < vec_size; j++)
{
out[j] = f(inputs.data()[i][j]..., b);
}
output.data()[i] = out;
}
});
......
......@@ -18,7 +18,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
#define MIGRAPHX_DEVICE_CONSTEXPR constexpr __device__ __host__
#define MIGRAPHX_DEVICE_CONSTEXPR constexpr __device__ __host__ // NOLINT
template <class T, std::size_t N>
using vec = T __attribute__((ext_vector_type(N)));
......
......@@ -24,7 +24,7 @@ struct hip_vector
__device__ __host__ hip_vector(std::initializer_list<T> x)
{
auto it = std::copy(x.begin(), x.end(), d);
std::copy(x.begin(), x.end(), d);
len = x.size();
}
......
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