Created by: yihuaxu
When PR#15601 is run, we found that the compare result between native and analysis predictor be shown the accuracy issue. The reason is that the changed order of operators result in the difference when the same name of output variable was used other place. So far, this PR can be helpful for it. As detail, please refer the below figures that describe the key difference. We can easily find that lookup_table(15) and lookup_table(20) have the same name of output variable, named as embedding_0.tmp_0. if lookup_table(20)(table: src_pos_enc_table(21)) is executed early than lookup_table(15)(table: src_word_emb_table(16)), it will result in the output of lookup_table(15) will be used by scale(18) and as one input of elementwise_add(23). If the variable name is same, other operator can only get the last content.
Associated PR: PR#15601
Figure I: The result of native predictor
Figure II: The result of analysis predictor that the graph be changed