Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Signed-off-by: chentong319 <[email protected]>
  • Loading branch information
chentong319 committed Sep 5, 2023
1 parent 27afb6c commit 994e649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/Conversion/ONNXToKrnl/RNN/GRU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,7 @@ void calculateState<GruState, GruActivationPack, GruWeightPack, GruBiasPack>(
createMath.cast(sequenceUB.getType(), sequenceIV), sequenceUB);
nextHt = createMath.select(cond,
/*should use initialH*/
createMath.constant(nextHt.getType(), 0.),
nextHt);
createMath.constant(nextHt.getType(), 0.), nextHt);
}

createKrnl.store(nextHt, Ht, indices);
Expand Down Expand Up @@ -621,8 +620,7 @@ void calculateState<GruState, GruActivationPack, GruWeightPack, GruBiasPack>(
createMath.cast(sequenceUB.getType(), sequenceIV), sequenceUB);
nextHt = createMath.select(cond,
/*should use initialH*/
createMath.constant(nextHt.getType(), 0.),
nextHt);
createMath.constant(nextHt.getType(), 0.), nextHt);
}

createKrnl.store(nextHt, Ht, indices);
Expand Down
2 changes: 1 addition & 1 deletion src/Conversion/ONNXToKrnl/RNN/LSTM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void calculateState<LstmState, LstmActivationPack, LstmWeightPack,
LstmBiasPack>(ConversionPatternRewriter &rewriter, Location loc, Value Xt,
LstmState state, LstmActivationPack activationPack,
LstmWeightPack weightPack, LstmBiasPack biasPack, Value sequenceIV,
Value directionIV, Value sequenceLens, bool isForward) {
Value directionIV, Value sequenceLens, bool isForward) {
// Equations for LSTM.
// it = f(Xt*(Wi^T) + Ht-1*(Ri^T) + Pi (.) Ct-1 + Wbi + Rbi)
// ft = f(Xt*(Wf^T) + Ht-1*(Rf^T) + Pf (.) Ct-1 + Wbf + Rbf)
Expand Down

0 comments on commit 994e649

Please sign in to comment.