QLinearTanhInt8 Class — pytorch Architecture
Architecture documentation for the QLinearTanhInt8 class in qlinear.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/cpu/qlinear.cpp lines 1537–1558
class QLinearTanhInt8 final {
public:
static at::Tensor run(
at::Tensor input,
const c10::intrusive_ptr<LinearPackedParamsBase>& packed_weight,
double output_scale,
int64_t output_zero_point) {
#if AT_MKLDNN_ENABLED() || !defined(STRIP_ERROR_MESSAGES)
auto& ctx = at::globalContext();
#endif
#if AT_MKLDNN_ENABLED()
if (ctx.qEngine() == at::QEngine::ONEDNN) {
return dynamic_cast<PackedLinearWeightsOnednn*>(packed_weight.get())->apply_tanh(
std::move(input), output_scale, output_zero_point);
}
#endif
TORCH_CHECK(
false,
"Didn't find engine for operation quantized::linear_tanh ",
toString(ctx.qEngine()));
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free