ReluFused Class — pytorch Architecture
Architecture documentation for the ReluFused class in qlinear_dynamic.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/ao_sparse/quantized/cpu/qlinear_dynamic.cpp lines 163–184
template <bool ReluFused>
class QLinearDynamicInt8 final {
public:
static at::Tensor run(
const at::Tensor& input,
const c10::intrusive_ptr<LinearPackedParamsBase>& packed_weight) {
auto& ctx = at::globalContext();
#ifdef USE_PYTORCH_QNNPACK
if (ctx.qEngine() == at::QEngine::QNNPACK) {
if (ReluFused) {
return packed_weight->apply_dynamic_relu(input);
} else {
return packed_weight->apply_dynamic(input);
}
}
#endif
TORCH_CHECK(
false,
"Didn't find engine for operation ao::sparse::qlinear_dynamic",
toString(ctx.qEngine()));
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free