MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / check_conflicts

Method check_conflicts

test/schedule_test.cpp:201–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
223template <class T>

Callers 1

TEST_CASEFunction · 0.80

Calls 5

has_streamMethod · 0.95
get_streamMethod · 0.95
check_conflictsFunction · 0.85
dforFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected