Skip to content

Commit

Permalink
[NFC] format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Vremold committed Aug 2, 2022
1 parent 29e6e56 commit 7797317
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Conversion/TorchToMhlo/ReductionOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ LogicalResult ConvertAtenReductionOp<AtenMaxDimOp>::matchAndRewrite(
Value input = adaptor.self();
auto inputTy = input.getType().template dyn_cast<RankedTensorType>();
if (!inputTy) {
return op.emitError("Only Tensor types supported in MHLO");
return op.emitError("only Tensor types supported in MHLO");
}
auto inputElemTy = inputTy.getElementType();
if (!inputElemTy.isIntOrFloat()) {
Expand Down Expand Up @@ -462,7 +462,7 @@ LogicalResult ConvertAtenReductionOp<AtenSumDimIntListOp>::matchAndRewrite(
Value input = adaptor.self();
auto inputTy = input.getType().dyn_cast<RankedTensorType>();
if (!inputTy) {
return op.emitError("Only Tensor types supported in MHLO");
return op.emitError("only Tensor types supported in MHLO");
}
auto dtype = adaptor.dtype();
if (!dtype.getType().isa<Torch::NoneType>()) {
Expand Down Expand Up @@ -495,7 +495,7 @@ LogicalResult ConvertAtenReductionOp<AtenSumDimIntListOp>::matchAndRewrite(

for (auto d : inputDims) {
d = toPositiveDim(d, inputTy.getRank());
// Drop invaid dim
// Drop invaid dims
if (isValidDim(d, inputTy.getRank())) {
dims.push_back(d);
}
Expand Down

0 comments on commit 7797317

Please sign in to comment.