Home / Class/ QLinearDynamicInt8 Class — pytorch Architecture

QLinearDynamicInt8 Class — pytorch Architecture

Architecture documentation for the QLinearDynamicInt8 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 164–184

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()));
  }
};

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free