| 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 | |
| 786 | struct compile : command<compile> |
nothing calls this directly
no test coverage detected