activationLimits Class — pytorch Architecture
Architecture documentation for the activationLimits class in QnnpackUtils.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/cpu/QnnpackUtils.h lines 395–414
template<typename T>
inline std::pair<T, T> activationLimits(
float scale,
int32_t zero_point,
Activation Ac) {
switch (Ac) {
case Activation::NONE:
return {std::numeric_limits<T>::min(),
std::numeric_limits<T>::max()};
case Activation::RELU:
return {QuantizeValue<T>(scale, zero_point, 0.0),
std::numeric_limits<T>::max()};
default:
#ifdef _MSC_VER
__assume(0);
#else
__builtin_unreachable();
#endif
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free