Yes, activations are quantized dynamically: i.e for every batch, the activations are quantized prior to the linear operation. This is done by calculating the dynamic range of the activations (min and max) and then quantizing the activations to 8 bits. This happens in C++ as part of the operator implementation itself, you can see the details at:
  
      github.com
  
  
    pytorch/pytorch/blob/master/aten/src/ATen/native/quantized/cpu/qlinear_dynamic.cpp#L64 2

    /*m=*/input_ptr,    /*min=*/&x_min,    /*max=*/&x_max,    /*len=*/input.numel());// Input tensor is quantized as 8-bit unsigned valuesstatic constexpr int precision = 8;static constexpr bool is_signed = false;// Calculate scale and zero point for quantization of input tensorauto q_params = quant_utils::ChooseQuantizationParams(    /*min=*/x_min,    /*max=*/x_max,    /*qmin=*/is_signed ? -(1 << (precision - 1)) : 0,    /*qmax=*/    is_signed ? ((1 << (precision - 1)) - 1) : (1 << precision) - 1,    /*preserve_sparsity=*/false,    /*force_scale_power_of_two=*/false,    /*reduce_range=*/reduce_range);q_params.precision = precision;