tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.73k stars 257 forks source link

Fix the wrong computation of dynamic strides for lowering AllocOp to LLVM #338

Open tungld opened 4 years ago

tungld commented 4 years ago

The computation of dynamic strides in lowering AllocOp was wrong.

Given a MemRefType with sizes = [5, 10], it computed strides = [5, 1], while the correct answer should be strides = [10, 1].

tungld commented 4 years ago

Thanks, @ftynse! I removed enumerate.

ftynse commented 4 years ago

Landed as https://github.com/llvm/llvm-project/commit/e5957ac3d7135eca95b4019eaa394703ad6112a6.

Since MLIR moved to LLVM, please submit your following contributions through https://reviews.llvm.org. Thank you!

@joker-eph could you please close?