Skip to content

Commit c64c7ed

Browse files
committed
Remove static precomputedAlphas bool in affine operation
`b->graph()` changes when switching models in bergamot-translator. That graph can have a new backend that has a different gemm precision specified.
1 parent 6575f72 commit c64c7ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tensors/cpu/intgemm_interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ template<Type vtype>
601601
static inline Expr affine(Expr a, Expr b, Expr bias, bool transA, bool transB, float scale, float /* clipValue currently unused */ = 0.0f, bool shiftedBias=false) {
602602
Type bElementType = b->value_type();
603603
Expr aQuantMult = nullptr;
604-
static bool precomputedAlphas = b->graph()->getBackend()->isPrecomputedAlpha();
604+
bool precomputedAlphas = b->graph()->getBackend()->isPrecomputedAlpha();
605605
if (precomputedAlphas) { //Shifting here maybe should check?
606606
aQuantMult = Expression<fetchAlphaFromModelNodeOp>(b);
607607
} else {

0 commit comments

Comments
 (0)