Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Tong <[email protected]>
  • Loading branch information
chentong319 committed Feb 17, 2025
1 parent d0a2985 commit 45447e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,9 @@ void genSafeCodeForGatherAlike(mlir::ConversionPatternRewriter &rewriter,
IndexExpr index = NonAffineIndexExpr(indexVal);

// index should be in range of [-r, r-1], where r = dim size of
// data[axis]
// data[axis].
// Assume that the index is loaded from tensor with negative value
// correction.
Value errorCondition =
((index < (-1) * axisDim) | (index >= axisDim)).getValue();
rewriter.create<scf::IfOp>(
Expand Down

0 comments on commit 45447e7

Please sign in to comment.