[PATCH] D140834: [MLIR][TOSA] Make Tosa_IntArrayAttrUptoN use DenseI64ArrayAttr

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 10:47:03 PST 2023


jpienaar accepted this revision.
jpienaar added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/Dialect/Tosa/IR/TosaOps.cpp:1228
   TransposeConv2DOp::Adaptor adaptor(operands.getValues(), attributes);
-  llvm::SmallVector<int64_t> outputShape;
-  getI64Values(adaptor.getOutShape(), outputShape);
+  // outputShape is mutable.
+  llvm::SmallVector<int64_t> outputShape(adaptor.getOutShape());
----------------
This confuses me more than it helps :) I read it and think "yes" but then I wonder was this in doubt.


================
Comment at: mlir/lib/Dialect/Tosa/IR/TosaOps.cpp:1230
+  llvm::SmallVector<int64_t> outputShape(adaptor.getOutShape());
   outputShape = convertToMlirShape(outputShape);
 
----------------
Could this have been combined with the previous?

llvm::SmallVector<int64_t> outputShape = convertToMlirShape(adaptor.getOutShape());


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140834/new/

https://reviews.llvm.org/D140834



More information about the llvm-commits mailing list