QLinearPackWeightInt8 Class — pytorch Architecture
Architecture documentation for the QLinearPackWeightInt8 class in qlinear_prepack.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/ao_sparse/quantized/cpu/qlinear_prepack.cpp lines 212–238
class QLinearPackWeightInt8 final {
public:
static c10::intrusive_ptr<LinearPackedParamsBase> run(
const at::Tensor& weight,
const std::optional<at::Tensor>& bias,
const int64_t out_features_block_size,
const int64_t in_features_block_size) {
auto& ctx = at::globalContext();
#ifdef USE_FBGEMM
if (ctx.qEngine() == at::QEngine::FBGEMM) {
return PackedLinearWeight::prepack(
weight, bias, out_features_block_size, in_features_block_size);
}
#endif
#ifdef USE_PYTORCH_QNNPACK
if (ctx.qEngine() == at::QEngine::QNNPACK) {
return PackedLinearWeightQnnp::prepack(
weight, bias, out_features_block_size, in_features_block_size);
}
#endif
TORCH_CHECK(
false,
"Didn't find engine for operation ao::sparse::qlinear_prepack ",
toString(ctx.qEngine()));
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free