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

Function verify_bisected_program

src/driver/verify.cpp:324–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void verify_bisected_program(const program& p,
325 const target& t,
326 compile_options options,
327 const verify_options& vo,
328 const parameter_map& inputs,
329 verify::tolerance tols)
330{
331 const auto* mm = p.get_main_module();
332
333 std::vector<std::size_t> trims = find_trim_instructions(*mm);
334 std::int64_t right = trims.size();
335 std::int64_t left = 0;
336 std::int64_t failed = -1;
337
338 while(left <= right)
339 {
340 std::int64_t mid = left + (right - left) / 2;
341 assert(mid < trims.size() and mid >= 0);
342 std::int64_t trim = trims.rbegin()[mid];
343 bool passed = verify_reduced(p, trim, t, options, vo, inputs, tols);
344 if(passed)
345 {
346 left = mid + 1;
347 }
348 else
349 {
350 failed = trim;
351 right = mid - 1;
352 }
353 }
354 if(failed > 0)
355 {
356 std::cout << "Failure starts at: " << failed << std::endl;
357 }
358}
359
360} // namespace MIGRAPHX_INLINE_NS
361} // namespace driver

Callers 1

runMethod · 0.85

Calls 4

find_trim_instructionsFunction · 0.85
verify_reducedFunction · 0.85
get_main_moduleMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected