Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zezhang committed Sep 5, 2024
1 parent 308213a commit 5a65012
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/Conversion/TorchToTcp/TcpCustomOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,11 @@ class ConvertAtenViewOp : public OpConversionPattern<AtenViewOp> {
torch_to_tcp::TorchToTcpCustomOpConversionHelper helper{op, rewriter,
getTypeConverter()};
Value self = adaptor.getSelf();
auto srcType = self.getType().cast<RankedTensorType>();
auto resultType =
getTypeConverter()->convertType(op.getType()).cast<RankedTensorType>();

SmallVector<int64_t> size;
// static size array will be handled through TOSA dialect
if (matchPattern(op.getSize(), m_TorchListOfConstantInts(size)))
return rewriter.notifyMatchFailure(op, "only dynamic shape is supported");
return rewriter.notifyMatchFailure(op,
"only non-constant size is supported");

helper.addOperand("self", self);
Operation *primListOp = op.getSize().getDefiningOp();
Expand Down

0 comments on commit 5a65012

Please sign in to comment.