Skip to content

Commit

Permalink
[OnnxToTorch] Delete unused variables. (#2728)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhanW authored Jan 5, 2024
1 parent fb1dfa3 commit 6096fcb
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,8 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(
}
return success();
}
Value zero = rewriter.create<Torch::ConstantIntOp>(
binder.getLoc(), rewriter.getType<Torch::IntType>(),
rewriter.getIntegerAttr(rewriter.getIntegerType(64), 0));
int64_t adjustmentInt =
cast<Torch::ValueTensorType>(data.getType()).getSizes().size();
Value adjustment = rewriter.create<Torch::ConstantIntOp>(
binder.getLoc(), rewriter.getType<Torch::IntType>(),
rewriter.getIntegerAttr(rewriter.getIntegerType(64),
adjustmentInt));
// convert axes (tensor) into torch int list while dealing with neg axis
for (int i = 0; i < axes.size(); i++) {
// Go through the axes list and get each dim in the list
Expand Down

0 comments on commit 6096fcb

Please sign in to comment.