QConv1dInt8 Class — pytorch Architecture
Architecture documentation for the QConv1dInt8 class in Conv.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/cudnn/Conv.cpp lines 345–365
class QConv1dInt8 final {
public:
static Tensor run(
Tensor act,
const c10::intrusive_ptr<ConvPackedParamsBase<2>>& packed_weight,
double output_scale,
int64_t output_zero_point) {
at::Tensor output;
// we currently use conv2d kernel for conv1d by making the input and weight tensors
// 4D rather than 3D. we add a dummy width dimension of size 1
// N, C, L -> N, C, 1, L
act = act.unsqueeze(-2);
if (kReluFused) {
output = packed_weight->apply_relu(act, output_scale, output_zero_point);
} else {
output = packed_weight->apply(act, output_scale, output_zero_point);
}
// N, C, 1, L -> N, C, L
return output.squeeze_(-2);
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free