QConvUnpackWeightsInt8 Class — pytorch Architecture
Architecture documentation for the QConvUnpackWeightsInt8 class in qconv_unpack.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/qconv_unpack.cpp lines 44–78
class QConvUnpackWeightsInt8 final {
public:
static std::tuple<at::Tensor, std::optional<at::Tensor>> run(
const c10::intrusive_ptr<ConvPackedParamsBase<kSpatialDim>>& packed_weight) {
auto& ctx = at::globalContext();
#ifdef USE_FBGEMM
if (ctx.qEngine() == at::QEngine::FBGEMM ||
ctx.qEngine() == at::QEngine::X86) {
return packed_weight->unpack();
}
#endif
#ifdef USE_PYTORCH_QNNPACK
if (ctx.qEngine() == at::QEngine::QNNPACK) {
TORCH_CHECK(
kSpatialDim == 2,
"quantized::conv2d_unpack (qnnpack): QNNPACK only supports Conv2d "
"now.");
return packed_weight->unpack();
}
#endif
#if AT_MKLDNN_ENABLED()
if (ctx.qEngine() == at::QEngine::ONEDNN) {
return packed_weight->unpack();
}
#endif
TORCH_CHECK(
false,
"Didn't find engine for operation quantized::conv2d_unpack ",
toString(ctx.qEngine()));
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free