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

Method run

src/driver/main.cpp:739–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737 }
738
739 void run()
740 {
741 auto p = c.l.load();
742 c.l.save(p);
743 std::cout << p << std::endl;
744
745 auto t = c.ct.get_target();
746 auto m =
747 c.parameters.generate(p, t, true, c.l.batch, loader::parse_param_dims(c.l.param_dims));
748
749 if(c.to_fp16)
750 {
751 vo.quantize = precision::fp16;
752 }
753 if(c.to_bf16)
754 {
755 vo.quantize = precision::bf16;
756 }
757 if(c.to_int8)
758 {
759 vo.quantize = precision::int8;
760 }
761
762 auto tols = get_tolerances(p, vo, rms_tol, atol, rtol);
763 std::cout << "rms_tol: " << tols.rms_tol << std::endl;
764 std::cout << "atol: " << tols.atol << std::endl;
765 std::cout << "rtol: " << tols.rtol << std::endl;
766
767 if(per_instruction)
768 {
769 verify_instructions(p, t, c.co, vo, tols);
770 }
771 else if(reduce)
772 {
773 verify_reduced_program(p, t, c.co, vo, m, tols);
774 }
775 else if(bisect)
776 {
777 verify_bisected_program(p, t, c.co, vo, m, tols);
778 }
779 else
780 {
781 verify_program(c.l.file, p, t, c.co, vo, m, tols);
782 }
783 }
784};
785
786struct compile : command<compile>

Callers

nothing calls this directly

Calls 9

get_tolerancesFunction · 0.85
verify_instructionsFunction · 0.85
verify_reduced_programFunction · 0.85
verify_bisected_programFunction · 0.85
get_targetMethod · 0.80
verify_programFunction · 0.70
loadMethod · 0.45
saveMethod · 0.45
generateMethod · 0.45

Tested by

no test coverage detected