HotFix: Segfault in the PTQ when using a model without bias
File modified: PTQ.cpp
Function: getBiasTensor()
Change summary:
Added a conditional check to ensure that if the bias tensor is not a producer , the function returns nullptr
.
This prevents a potential segmentation fault caused by attempting to cast and access the output of a non-existent producer:
std::static_pointer_cast<OperatorTensor>(producer->getOperator())->getOutput(0)
Returning nullptr
in this case correctly signals the absence of a bias tensor.
Edited by Noam Zerah