A new intermediate IR has been introduced in kernel parser in order to keep more shape info and high level operation info before converting to matx.ir. With this new ir:
each python AST statement is first converted to this new ir, and then the new IR tree is converted to matx.ir.
shape infer, type infer, and BufferRegion can be delayed till the construction of computeBlock and more precise results can be produced. For example, BufferRegion now counts all operations on the index.
By applying this ir:
the code for ops of scalars and ndarrays is merged since they are all handled by the ir
A new intermediate IR has been introduced in kernel parser in order to keep more shape info and high level operation info before converting to matx.ir. With this new ir:
By applying this ir: