MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / zero_point

Method zero_point

src/custom/impl/tensor.cpp:347–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347uint8_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
353bool DType::is_legal(const std::string& dtype) {
354 auto&& dtype_cstr2benum = DTypeMapper::inst().dtype_cstr2benum;

Callers 2

load_dtypeFunction · 0.80
TESTFunction · 0.80

Calls 2

strFunction · 0.85
getMethod · 0.45

Tested by 1

TESTFunction · 0.64