Profiler: Count Memory Access & Arith Ops from MLIR code
Add feature:
Read the .mlir code and count memory access and arithmetic ops by analyzing the loop nest.
How to use the new feature:python profile.py <file_name.mlir>
Detailed description: implementation details
Get the tripcount of current loop, and accumulates the number of memory access when visiting AffineLoadOp and AffineStoreOp; accumulates the number of ArithOps when visiting arith.AddIOp, arith.MulIOp, arith.AddFOp, arith.MulFOp
Profiler: Count Memory Access & Arith Ops from MLIR code
Add feature: Read the
.mlir
code and count memory access and arithmetic ops by analyzing the loop nest.How to use the new feature:
python profile.py <file_name.mlir>
Detailed description: implementation details Get the tripcount of current loop, and accumulates the number of memory access when visiting
AffineLoadOp
andAffineStoreOp
; accumulates the number of ArithOps when visitingarith.AddIOp
,arith.MulIOp
,arith.AddFOp
,arith.MulFOp
Link to the tests: https://github.com/zzzDavid/hcl-memory-opt/tree/main/roofline_profile