Skip to content

Commit f7d83a8

Browse files
[TOSA] Remove temporary getTosaConstShape() func
Signed-off-by: Justin Ngo <[email protected]> Change-Id: I4e1c19869b90903058f2f3f8b934191b85efe5ef
1 parent 7c9bfe0 commit f7d83a8

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

include/torch-mlir/Conversion/TorchToTosa/TosaLegalizeUtils.h

-5
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ LogicalResult getConvOpsAccType(PatternRewriter &rewriter,
127127
RankedTensorType weightTy,
128128
RankedTensorType outputTy, TypeAttr &accType);
129129

130-
// Temporary function to get TOSA const shape
131-
// TODO: Remove this function when getTosaConstShape is available in
132-
// externals/llvm-project/mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h
133-
Value getTosaConstShape(PatternRewriter &rewriter, Location loc,
134-
llvm::ArrayRef<int64_t> shape);
135130
} // namespace tosa
136131
} // namespace mlir
137132

lib/Conversion/TorchToTosa/TosaLegalizeUtils.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,5 @@ LogicalResult getConvOpsAccType(PatternRewriter &rewriter,
505505
return success();
506506
}
507507

508-
// Temporary function to get TOSA const shape
509-
// TODO: Remove this function when getTosaConstShape is available in
510-
// externals/llvm-project/mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h
511-
Value getTosaConstShape(PatternRewriter &rewriter, Location loc,
512-
llvm::ArrayRef<int64_t> shape) {
513-
auto attr = rewriter.getIndexTensorAttr(shape);
514-
auto type = mlir::tosa::shapeType::get(rewriter.getContext(), shape.size());
515-
mlir::Operation *mlir_op =
516-
rewriter.create<tosa::ConstShapeOp>(loc, type, attr);
517-
return mlir_op->getResult(0);
518-
}
519-
520508
} // namespace tosa
521509
} // namespace mlir

0 commit comments

Comments
 (0)