| 234 | } |
| 235 | |
| 236 | static auto parse_dyn_dims_json(const std::string& dd_json) |
| 237 | { |
| 238 | // expecting a json string like "[{min:1,max:64,optimals:[1,2,4,8]},3,224,224]" |
| 239 | auto v = from_json_string(convert_to_json(dd_json)); |
| 240 | std::vector<migraphx::shape::dynamic_dimension> dyn_dims; |
| 241 | std::transform(v.begin(), v.end(), std::back_inserter(dyn_dims), [&](const auto& x) { |
| 242 | if(x.is_object()) |
| 243 | return from_value<migraphx::shape::dynamic_dimension>(x); |
| 244 | auto d = x.template to<std::size_t>(); |
| 245 | return migraphx::shape::dynamic_dimension{d, d}; |
| 246 | }); |
| 247 | return dyn_dims; |
| 248 | } |
| 249 | |
| 250 | static auto parse_dyn_dims_map(const std::vector<std::string>& param_dyn_dims) |
| 251 | { |
nothing calls this directly
no test coverage detected