Home / Class/ LinearDynamicFp16Onednn Class — pytorch Architecture

LinearDynamicFp16Onednn Class — pytorch Architecture

Architecture documentation for the LinearDynamicFp16Onednn class in qlinear_dynamic.cpp from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/quantized/cpu/qlinear_dynamic.cpp lines 999–1023

class LinearDynamicFp16Onednn final {
 public:
  static Tensor run(
      Tensor act, // int8 CPU tensor, not QTensor
      Tensor onednn_weight, // int8 tensor from MkldnnCPU
      std::optional<Tensor> bias) {
#if AT_MKLDNN_ENABLED()
    return linear_dynamic_fp16_with_onednn_weight(
        act, onednn_weight, bias, /*relu_fused*/false);
#endif
    TORCH_CHECK(false, "Unimplemented (linear_dynamic_fp16_with_onednn_weight)");
  }

  static Tensor run_relu(
      Tensor act, // int8 CPU tensor, not QTensor
      Tensor onednn_weight, // int8 tensor from MkldnnCPU
      std::optional<Tensor> bias) {
#if AT_MKLDNN_ENABLED()
    return linear_dynamic_fp16_with_onednn_weight(
        act, onednn_weight, bias, /*relu_fused*/true);
#endif
    TORCH_CHECK(false, "Unimplemented (linear_dynamic_fp16_with_onednn_weight)");
  }

};

Analyze Your Own Codebase

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

Try Supermodel Free