"driver/src/conv_driver.cpp" did not exist on "51a9fa1dbddd74558472881f616a7fb79759fd24"
Commit c3861fb1 authored by charlie's avatar charlie
Browse files

formatting

parent d9cd32a4
...@@ -209,7 +209,6 @@ shape shape::from_permutation(type_t t, ...@@ -209,7 +209,6 @@ shape shape::from_permutation(type_t t,
return result; return result;
} }
shape::type_t shape::type() const { return impl->m_type; } shape::type_t shape::type() const { return impl->m_type; }
const std::vector<std::size_t>& shape::lens() const { return impl->m_lens; } const std::vector<std::size_t>& shape::lens() const { return impl->m_lens; }
...@@ -448,22 +447,14 @@ std::vector<std::size_t> shape::opt_lens() const ...@@ -448,22 +447,14 @@ std::vector<std::size_t> shape::opt_lens() const
; ;
} }
bool shape::dynamic_dimension::is_fixed() const bool shape::dynamic_dimension::is_fixed() const { return this->min == this->max; }
{
return this->min == this->max;
}
bool shape::dynamic_dimension::has_optimal() const bool shape::dynamic_dimension::has_optimal() const { return opt != 0; }
{
return opt != 0;
}
template <class Self, class F> template <class Self, class F>
auto shape::dynamic_dimension::reflect(Self& self, F f) auto shape::dynamic_dimension::reflect(Self& self, F f)
{ {
return pack(f(self.min, "min"), return pack(f(self.min, "min"), f(self.max, "max"), f(self.opt, "opt"));
f(self.max, "max"),
f(self.opt, "opt"));
} }
bool operator==(const shape::dynamic_dimension& x, const shape::dynamic_dimension& y) bool operator==(const shape::dynamic_dimension& x, const shape::dynamic_dimension& y)
...@@ -561,23 +552,14 @@ void migraphx_from_value(const value& v, shape& s) ...@@ -561,23 +552,14 @@ void migraphx_from_value(const value& v, shape& s)
{ {
auto v_dd = v.at("dynamic_dimensions"); auto v_dd = v.at("dynamic_dimensions");
std::vector<shape::dynamic_dimension> dyn_dims(v.at("dynamic_dimensions").size()); std::vector<shape::dynamic_dimension> dyn_dims(v.at("dynamic_dimensions").size());
std::transform( std::transform(v_dd.begin(), v_dd.end(), dyn_dims.begin(), [](migraphx::value x) {
v_dd.begin(),
v_dd.end(),
dyn_dims.begin(),
[](migraphx::value x)
{
auto x_min = x.at("min").template to<size_t>(); auto x_min = x.at("min").template to<size_t>();
auto x_max = x.at("max").template to<size_t>(); auto x_max = x.at("max").template to<size_t>();
auto x_opt = x.at("opt").template to<size_t>(); auto x_opt = x.at("opt").template to<size_t>();
return shape::dynamic_dimension{x_min, x_max, x_opt}; return shape::dynamic_dimension{x_min, x_max, x_opt};
} });
);
s = shape{ s = shape{shape::parse_type(t), dyn_dims};
shape::parse_type(t),
dyn_dims
};
} }
} }
} }
......
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