| 174 | } |
| 175 | |
| 176 | void quantize_int8(program& prog, |
| 177 | const target& t, |
| 178 | const std::vector<parameter_map>& calibration, |
| 179 | const std::unordered_set<std::string>& ins_names) |
| 180 | { |
| 181 | std::unordered_set<std::string> op_names = {"convolution", "dot"}; |
| 182 | if(op_names != ins_names) |
| 183 | { |
| 184 | MIGRAPHX_THROW("QUANTIZE_INT8: only support DOT and CONVOLUTION operation"); |
| 185 | } |
| 186 | quantize_8bits(prog, t, shape::int8_type, calibration, ins_names); |
| 187 | } |
| 188 | |
| 189 | void quantize_int4_weights(program& prog) |
| 190 | { |