| 199 | bool has_stream(migraphx::instruction_ref ins) { return model.ins2stream->count(ins) > 0; } |
| 200 | |
| 201 | void check_conflicts(migraphx::module& m, |
| 202 | std::vector<std::vector<migraphx::instruction_ref>> conflicts, |
| 203 | bool result = true) |
| 204 | { |
| 205 | migraphx::dfor(conflicts.size(), conflicts.size())([&](auto i, auto j) { |
| 206 | if(i == j) |
| 207 | return; |
| 208 | for(auto ins1 : conflicts[i]) |
| 209 | { |
| 210 | for(auto ins2 : conflicts[j]) |
| 211 | { |
| 212 | // If both instructions are on the same stream then dont check for a conflict |
| 213 | if(this->has_stream(ins1) and this->has_stream(ins2) and |
| 214 | this->get_stream(ins1) == this->get_stream(ins2)) |
| 215 | continue; |
| 216 | CHECK(::check_conflicts(m, ins1, ins2) == result); |
| 217 | } |
| 218 | } |
| 219 | }); |
| 220 | } |
| 221 | }; |
| 222 | |
| 223 | template <class T> |
no test coverage detected