File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,10 @@ def format(self, node):
225225 params .setdefault ('n_outer' , 1 )
226226 params .setdefault ('exp_scale' , 1.0 )
227227 params .setdefault ('parallelization_factor' , - 1 )
228+ if params ['accum_t' ].name == 'model_default_t' : # type: ignore
229+ params ['accum_t' ] = params ['exp_table_t' ]
230+ if params ['inv_inp_t' ].name == 'model_default_t' : # type: ignore
231+ params ['inv_inp_t' ] = params ['exp_table_t' ]
228232
229233 if 'inp_norm_t' not in params :
230234 input_t = node .get_input_variable ().type .precision
Original file line number Diff line number Diff line change @@ -552,6 +552,9 @@ def _(node: Softmax):
552552 if not node .attributes .get ('_bit_exact' , False ):
553553 # Softmax is not bit-exact by default
554554 warn (f'Softmax layer { node .name } is converted from a frontend not supporting bit-exact softmax.' )
555+ accum_t = node .attributes ['accum_t' ]
556+ default_register_precision (node )
557+ node .attributes ['accum_t' ] = accum_t
555558 return
556559
557560 inv_inp_t : FixedPrecisionType = node .attributes ['inv_inp_t' ].precision
You can’t perform that action at this time.
0 commit comments