File tree 2 files changed +7
-0
lines changed
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):
225
225
params .setdefault ('n_outer' , 1 )
226
226
params .setdefault ('exp_scale' , 1.0 )
227
227
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' ]
228
232
229
233
if 'inp_norm_t' not in params :
230
234
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):
552
552
if not node .attributes .get ('_bit_exact' , False ):
553
553
# Softmax is not bit-exact by default
554
554
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
555
558
return
556
559
557
560
inv_inp_t : FixedPrecisionType = node .attributes ['inv_inp_t' ].precision
You can’t perform that action at this time.
0 commit comments