mirror of https://github.com/llvm/torch-mlir
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
parent
6d74e8cccd
commit
7cb2db6279
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue