Skip to content

Commit

Permalink
refactor(ONNX): extracts inputTensor dimensions from rank derivation
Browse files Browse the repository at this point in the history
  • Loading branch information
bjacobgordon committed Jan 8, 2025
1 parent 7f3913d commit 7d8d04b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2752,7 +2752,8 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(
Value inputTensor = operands[0];
Torch::ValueTensorType inputTensor_shape =
cast<Torch::ValueTensorType>(inputTensor.getType());
unsigned rank = inputTensor_shape.getSizes().size();
ArrayRef<int64_t> inputTensor_dimensions = inputTensor_shape.getSizes();
unsigned rank = inputTensor_dimensions.size();

Value cstFalse =
rewriter.create<Torch::ConstantBoolOp>(binder.getLoc(), false);
Expand Down

0 comments on commit 7d8d04b

Please sign in to comment.