Closed jelmervdl closed 2 years ago
Ah yes, now that the marian instance is kept around, my static optimisations will burn.... And probably a bunch of other things.
And yes the static optimisation was exactly this: avoid doing this check for every affine call as this value would never change once a model is loaded... As long as models are not hot swapped.
This shouldn't show up in the runtime like the calls to shape that you fixed earlier...
This fixes a bug when switching between translation models that have different
gemm-precision
precisions specified in their configuration file. Which is why we never noticed it with our own student models (allint8shiftAlpha
), but do see it now with the Ukrainian model (which uses justint8
)I tried to go through git blame to figure out why it was marked
static
. @XapaJIaMnu please correct me if I'm wrong.static auto map = b->graph()->params()->getMap();
infetchAlphaFromModel(Expr b)
disappears when that function is rewritten into aUnaryNodeOp
. But the one removed in this pull request remained.