Skip to content

Commit

Permalink
Remove unnecessary bounds checks. (#199)
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Enkovich <[email protected]>
  • Loading branch information
ienkovich authored Dec 19, 2024
1 parent afeda07 commit 8390fa2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions third_party/cpu/include/TritonCPUTransforms/OptCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ inline Value shapeCast(Location loc, Value in,
#define op_sitofp(ty, val) rewriter.create<arith::SIToFPOp>(loc, ty, val)
#define op_fptosi(ty, val) rewriter.create<arith::FPToSIOp>(loc, ty, val)
#define op_read(ty, memRef, indices) \
rewriter.create<vector::TransferReadOp>(loc, ty, memRef, indices)
rewriter.create<vector::TransferReadOp>( \
loc, ty, memRef, indices, SmallVector<bool>(ty.getRank(), true))
#define op_write(val, memRef, indices) \
rewriter.create<vector::TransferWriteOp>(loc, val, memRef, indices)
rewriter.create<vector::TransferWriteOp>( \
loc, val, memRef, indices, \
SmallVector<bool>(cast<VectorType>(val.getType()).getRank(), true))
#define op_interleave(lhs, rhs) \
rewriter.create<vector::InterleaveOp>(loc, lhs, rhs)
#define op_extract(vec, idx) rewriter.create<vector::ExtractOp>(loc, vec, idx)
Expand Down

0 comments on commit 8390fa2

Please sign in to comment.