[TOSA] Matching ranks for TOSA operators
resolved merged conflict and rebased > Quick scan only, was the equalize rank function in previous PR?

yes it has been merged into llvm: in mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h @jpienaar please review this when you get a chance? resolved merge conflicts resolved merge conflicts rebased and resolved merge conflicts rebased and resolved merge conflicts Hi @jpienaar Can you please review this PR ? Thank you! Hi @jpienaar / @rsuderman Can you please review this PR ? Thank you! Hi @Tai78641 Can you please resolve conflicts? Thank you! > Hi @Tai78641 Can you please resolve conflicts? Thank you!

done hi @gbaned @jpienaar could you guys help take another look at this? I also got another patch which is depended on this one. Thanks.  Hi @jpienaar Can you please review this PR ? Thank you! Hi @jpienaar Can you please review this PR ? Thank you! Hi @jpienaar Can you please review this PR ? Thank you! Hi @jpienaar Can you please review this PR ? Thank you! @NatashaKnk would you review this for me?
this is blocking TOSA dialect upstreaming because we inserted a trait in TOSA to require all operands have equal ranks.
This patch is intended to pre-empt any issues that change might cause in TF. Hi @Tai78641 Can you please resolve conflicts? Thank you! > Hi @Tai78641 Can you please resolve conflicts? Thank you!

rebased and resolved conflicts Hi @Tai78641 Can you please resolve conflicts? Thank you! > Hi @Tai78641 Can you please resolve conflicts? Thank you!

rebased and resolved conflicts
This patch modifies tosa legalization to construct matching ranks
upfront for TOSA operators with ResultsBroadcastableShape trait.

Two major changes:
1. Add parameter "rank" to: 
      - getTosaConstTensorSingleF32, 
      - getTosaConstTensorSingleI32, 
      - getTosaConstTensorScalarInt,

   functions and create const tensors with appropriate ranks upfront.

2. insert EqualizeRanks calls to reshape the lower rank input before
    constructing TOSA operators that require matching ranks.
