QMul Class — pytorch Architecture
Architecture documentation for the QMul class in qmul.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/cpu/qmul.cpp lines 315–335
class QMul final {
public:
static Tensor run(Tensor qa, Tensor qb, double scale, int64_t zero_point) {
check_inputs(qa, qb);
#ifdef USE_XNNPACK
int64_t q_max = std::numeric_limits<c10::qint8::underlying>::max();
if (zero_point < q_max && qa.scalar_type() == kQInt8) {
return _mul_out_xnnpack<c10::qint8, ReLUFused>(qa, qb, scale, zero_point);
}
#endif // USE_XNNPACK
auto qc = at::_empty_affine_quantized(
infer_size_dimvector(qa.sizes(), qb.sizes()),
at::device(kCPU).dtype(qa.scalar_type()),
scale,
zero_point,
qa.suggest_memory_format());
return _mul_out<ReLUFused>(qc, qa, qb);
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free