Skip to content

Commit

Permalink
Update dtype check in torch-to-tosa clamp op (llvm#2529)
Browse files Browse the repository at this point in the history
As titled.

---------

Co-authored-by: Ze Zhang <ze.zhang@getcruise.com>
  • Loading branch information
zezhang and Ze Zhang authored Oct 24, 2023
1 parent 6d74e8c commit 7cb2db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Conversion/TorchToTosa/TorchToTosa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 7cb2db6

Please sign in to comment.