| 345 | } |
| 346 | |
| 347 | uint8_t DType::zero_point() const { |
| 348 | mgb_assert( |
| 349 | enumv() == DTypeEnum::quint8, "dtype %s has no zero point", str().c_str()); |
| 350 | return DTypeImplRef(m_impl.get()).param<dtype::Quantized8Asymm>().zero_point; |
| 351 | } |
| 352 | |
| 353 | bool DType::is_legal(const std::string& dtype) { |
| 354 | auto&& dtype_cstr2benum = DTypeMapper::inst().dtype_cstr2benum; |