Update dtype check in torch-to-tosa clamp op (#2529)

As titled.

---------

Co-authored-by: Ze Zhang <ze.zhang@getcruise.com>
pull/2530/head snapshot-20231024.1001
Ze Zhang 2023-10-23 17:04:30 -07:00 committed by GitHub
parent 6d74e8cccd
commit 7cb2db6279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3986,7 +3986,7 @@ LogicalResult ConvertAtenOp<AtenClampOp>::matchAndRewrite(
IntegerAttr min_int, max_int;
FloatAttr min_fp, max_fp;
if (selfType.getElementType().isa<mlir::FloatType>()) {
if (op.getMin().getType().isa<Torch::FloatType>()) {
double fp_min, fp_max;
if (!matchPattern(op.getMin(), m_TorchConstantFloat(&fp_min)))
return rewriter.notifyMatchFailure(