@@ -1452,7 +1452,7 @@ func.func @resize_nearest_static(%arg0: tensor<2x2x2x2x2xf32>) -> tensor<2x4x4x4
14521452 %0 = tensorrt.resize_nearest {
14531453 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
14541454 nearestRounding = #tensorrt.resize_round_mode <kFLOOR >,
1455- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 x2 x2 xf32 > to tensor <2 x4 x4 x4 x4 xf32 >
1455+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 x2 x2 xf32 >) -> tensor <2 x4 x4 x4 x4 xf32 >
14561456 return %0 : tensor <2 x4 x4 x4 x4 xf32 >
14571457}
14581458
@@ -1464,18 +1464,18 @@ func.func @resize_nearest_static(%arg0: tensor<2x2x2x2xf32>) -> tensor<2x4x4x4xf
14641464 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
14651465 nearestRounding = #tensorrt.resize_round_mode <kFLOOR >,
14661466 scales = array <f32 : 2.0 , 3.0 >,
1467- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 x2 xf32 > to tensor <2 x4 x4 x4 xf32 >
1467+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 x2 xf32 >) -> tensor <2 x4 x4 x4 xf32 >
14681468 return %0 : tensor <2 x4 x4 x4 xf32 >
14691469}
14701470
14711471// -----
14721472
14731473func.func @resize_nearest_dynamic (%arg0: tensor <2 x2 x2 x?x?xf32 >) -> tensor <2 x2 x2 x?x?xf32 > {
1474- // expected-error @below {{'tensorrt.resize_nearest' op output innermost min(3, rank(input)) dimension that resize on cannot be dynamic when resize scales parameter is NOT specified}}
1474+ // expected-error @below {{'tensorrt.resize_nearest' op input innermost min(3, rank(input)) dimension that resize on cannot be dynamic when output_shape parameter is NOT specified and it cannot be inferred statically }}
14751475 %0 = tensorrt.resize_nearest {
14761476 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
14771477 nearestRounding = #tensorrt.resize_round_mode <kFLOOR >,
1478- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 x?x?xf32 > to tensor <2 x2 x2 x?x?xf32 >
1478+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 x?x?xf32 >) -> tensor <2 x2 x2 x?x?xf32 >
14791479 return %0 : tensor <2 x2 x2 x?x?xf32 >
14801480}
14811481
@@ -1487,7 +1487,7 @@ func.func @resize_nearest_dynamic(%arg0: tensor<2x2x2x?x?xf32>) -> tensor<2x2x2x
14871487 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
14881488 nearestRounding = #tensorrt.resize_round_mode <kFLOOR >,
14891489 scales = array <f32 : 1.0 , 1.0 , 2.0 , 2.0 , 2.0 >,
1490- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 x?x?xf32 > to tensor <2 x2 x2 x?x?xf32 >
1490+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 x?x?xf32 >) -> tensor <2 x2 x2 x?x?xf32 >
14911491 return %0 : tensor <2 x2 x2 x?x?xf32 >
14921492}
14931493
@@ -1499,7 +1499,7 @@ func.func @resize_nearest_dynamic(%arg0: tensor<2x2x2x?x?xf32>) -> tensor<2x4x4x
14991499 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
15001500 nearestRounding = #tensorrt.resize_round_mode <kFLOOR >,
15011501 scales = array <f32 : 1.0 , 2.0 , 2.0 , 2.0 , 2.0 >,
1502- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 x?x?xf32 > to tensor <2 x4 x4 x?x?xf32 >
1502+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 x?x?xf32 >) -> tensor <2 x4 x4 x?x?xf32 >
15031503 return %0 : tensor <2 x4 x4 x?x?xf32 >
15041504}
15051505
@@ -1511,7 +1511,7 @@ func.func @resize_nearest_dynamic(%arg0: tensor<2x3xf32>) -> tensor<4x6xf16> {
15111511 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
15121512 nearestRounding = #tensorrt.resize_round_mode <kFLOOR >,
15131513 scales = array <f32 : 2.0 , 2.0 >,
1514- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x3 xf32 > to tensor <4 x6 xf16 >
1514+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x3 xf32 >) -> tensor <4 x6 xf16 >
15151515 return %0 : tensor <4 x6 xf16 >
15161516}
15171517// -----
@@ -1520,7 +1520,7 @@ func.func @resize_linear_static(%arg0: tensor<2x2x2x2x2xf32>) -> tensor<2x4x4x4x
15201520 // expected-error @below {{'tensorrt.resize_linear' op only supports resizing on the innermost min(3, rank(input)) dimensions}}
15211521 %0 = tensorrt.resize_linear {
15221522 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kALIGN_CORNERS >,
1523- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 x2 x2 xf32 > to tensor <2 x4 x4 x4 x4 xf32 >
1523+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 x2 x2 xf32 >) -> tensor <2 x4 x4 x4 x4 xf32 >
15241524 return %0 : tensor <2 x4 x4 x4 x4 xf32 >
15251525}
15261526
@@ -1531,17 +1531,17 @@ func.func @resize_linear_static(%arg0: tensor<2x2x2x2x2xf32>) -> tensor<2x2x4x4x
15311531 %0 = tensorrt.resize_linear {
15321532 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kALIGN_CORNERS >,
15331533 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
1534- scales = array <f32 : 2.0 , 3.0 >} %arg0 : tensor <2 x2 x2 x2 x2 xf32 > to tensor <2 x2 x4 x4 x4 xf32 >
1534+ scales = array <f32 : 2.0 , 3.0 >} %arg0 : ( tensor <2 x2 x2 x2 x2 xf32 >) -> tensor <2 x2 x4 x4 x4 xf32 >
15351535 return %0 : tensor <2 x2 x4 x4 x4 xf32 >
15361536}
15371537
15381538// -----
15391539
15401540func.func @resize_linear_dynamic (%arg0: tensor <2 x2 x2 x?x?xf32 >) -> tensor <2 x2 x2 x?x?xf32 > {
1541- // expected-error @below {{'tensorrt.resize_linear' op output innermost min(3, rank(input)) dimension that resize on cannot be dynamic when resize scales parameter is NOT specified}}
1541+ // expected-error @below {{'tensorrt.resize_linear' op input innermost min(3, rank(input)) dimension that resize on cannot be dynamic when output_shape parameter is NOT specified and it cannot be inferred statically }}
15421542 %0 = tensorrt.resize_linear {
15431543 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
1544- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 x?x?xf32 > to tensor <2 x2 x2 x?x?xf32 >
1544+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 x?x?xf32 >) -> tensor <2 x2 x2 x?x?xf32 >
15451545 return %0 : tensor <2 x2 x2 x?x?xf32 >
15461546}
15471547
@@ -1552,7 +1552,7 @@ func.func @resize_linear_dynamic(%arg0: tensor<2x2x2x?x?xf32>) -> tensor<2x2x2x?
15521552 %0 = tensorrt.resize_linear {
15531553 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
15541554 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
1555- scales = array <f32 : 1.0 , 1.0 , 2.0 , 3.0 , 3.0 >} %arg0 : tensor <2 x2 x2 x?x?xf32 > to tensor <2 x2 x2 x?x?xf32 >
1555+ scales = array <f32 : 1.0 , 1.0 , 2.0 , 3.0 , 3.0 >} %arg0 : ( tensor <2 x2 x2 x?x?xf32 >) -> tensor <2 x2 x2 x?x?xf32 >
15561556 return %0 : tensor <2 x2 x2 x?x?xf32 >
15571557}
15581558
@@ -1563,7 +1563,7 @@ func.func @resize_linear_dynamic(%arg0: tensor<2x2x2x3x3xf32>) -> tensor<2x4x4x9
15631563 %0 = tensorrt.resize_linear {
15641564 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
15651565 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
1566- scales = array <f32 : 1.0 , 2.0 , 2.0 , 3.0 , 3.0 >} %arg0 : tensor <2 x2 x2 x3 x3 xf32 > to tensor <2 x4 x4 x9 x9 xf32 >
1566+ scales = array <f32 : 1.0 , 2.0 , 2.0 , 3.0 , 3.0 >} %arg0 : ( tensor <2 x2 x2 x3 x3 xf32 >) -> tensor <2 x4 x4 x9 x9 xf32 >
15671567 return %0 : tensor <2 x4 x4 x9 x9 xf32 >
15681568}
15691569
@@ -1574,7 +1574,7 @@ func.func @resize_linear_dynamic(%arg0: tensor<2x?xf32>) -> tensor<10x?xf32> {
15741574 %0 = tensorrt.resize_linear {
15751575 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
15761576 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
1577- scales = array <f32 : 4.0 , 5.0 >} %arg0 : tensor <2 x?xf32 > to tensor <10 x?xf32 >
1577+ scales = array <f32 : 4.0 , 5.0 >} %arg0 : ( tensor <2 x?xf32 >) -> tensor <10 x?xf32 >
15781578 return %0 : tensor <10 x?xf32 >
15791579}
15801580
@@ -1585,7 +1585,7 @@ func.func @resize_cubic_rank1(%arg0: tensor<2xf32>) -> tensor<4xf32> {
15851585 %0 = tensorrt.resize_cubic {
15861586 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kALIGN_CORNERS >,
15871587 cubicCoeff = -0.75 : f32 ,
1588- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 xf32 > to tensor <4 xf32 >
1588+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 xf32 >) -> tensor <4 xf32 >
15891589 return %0 : tensor <4 xf32 >
15901590}
15911591
@@ -1596,7 +1596,7 @@ func.func @resize_cubic_static(%arg0: tensor<2x2x2xf32>) -> tensor<4x4x4xf32> {
15961596 %0 = tensorrt.resize_cubic {
15971597 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kALIGN_CORNERS >,
15981598 cubicCoeff = -0.5 : f32 ,
1599- selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : tensor <2 x2 x2 xf32 > to tensor <4 x4 x4 xf32 >
1599+ selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >} %arg0 : ( tensor <2 x2 x2 xf32 >) -> tensor <4 x4 x4 xf32 >
16001600 return %0 : tensor <4 x4 x4 xf32 >
16011601}
16021602
@@ -1608,18 +1608,18 @@ func.func @resize_cubic_static(%arg0: tensor<2x2x2xf32>) -> tensor<4x4x4xf32> {
16081608 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kALIGN_CORNERS >,
16091609 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
16101610 scales = array <f32 : 1.0 , 1.0 , 2.0 , 3.0 , 3.0 >,
1611- cubicCoeff = -0.5 : f32 } %arg0 : tensor <2 x2 x2 xf32 > to tensor <4 x4 x4 xf32 >
1611+ cubicCoeff = -0.5 : f32 } %arg0 : ( tensor <2 x2 x2 xf32 >) -> tensor <4 x4 x4 xf32 >
16121612 return %0 : tensor <4 x4 x4 xf32 >
16131613}
16141614
16151615// -----
16161616
16171617func.func @resize_cubic_dynamic (%arg0: tensor <2 x?x?xf32 >) -> tensor <2 x?x?xf32 > {
1618- // expected-error @below {{'tensorrt.resize_cubic' op output innermost 2 dimensions that resize on cannot be dynamic when resize scales parameter is NOT specified}}
1618+ // expected-error @below {{'tensorrt.resize_cubic' op input innermost 2 dimensions that resize on cannot be dynamic when output_shape parameter is NOT specified and it cannot be inferred statically }}
16191619 %0 = tensorrt.resize_cubic {
16201620 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
16211621 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
1622- cubicCoeff = -1.0 : f32 } %arg0 : tensor <2 x?x?xf32 > to tensor <2 x?x?xf32 >
1622+ cubicCoeff = -1.0 : f32 } %arg0 : ( tensor <2 x?x?xf32 >) -> tensor <2 x?x?xf32 >
16231623 return %0 : tensor <2 x?x?xf32 >
16241624}
16251625
@@ -1631,7 +1631,7 @@ func.func @resize_cubic_dynamic(%arg0: tensor<2x2x?xf32>) -> tensor<2x4x?xf32> {
16311631 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
16321632 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
16331633 scales = array <f32 : 1.0 , 3.0 , 3.0 >,
1634- cubicCoeff = -1.0 : f32 } %arg0 : tensor <2 x2 x?xf32 > to tensor <2 x4 x?xf32 >
1634+ cubicCoeff = -1.0 : f32 } %arg0 : ( tensor <2 x2 x?xf32 >) -> tensor <2 x4 x?xf32 >
16351635 return %0 : tensor <2 x4 x?xf32 >
16361636}
16371637
@@ -1643,7 +1643,7 @@ func.func @resize_cubic_dynamic(%arg0: tensor<2x2x3x?xf32>) -> tensor<2x4x6x?xf3
16431643 coordinateTransformation = #tensorrt.resize_coordinate_transformation <kASYMMETRIC >,
16441644 selectorForSinglePixel = #tensorrt.resize_selector <kFORMULA >,
16451645 scales = array <f32 : 1.0 , 2.0 , 2.0 , 2.0 >,
1646- cubicCoeff = -1.0 : f32 } %arg0 : tensor <2 x2 x3 x?xf32 > to tensor <2 x4 x6 x?xf32 >
1646+ cubicCoeff = -1.0 : f32 } %arg0 : ( tensor <2 x2 x3 x?xf32 >) -> tensor <2 x4 x6 x?xf32 >
16471647 return %0 : tensor <2 x4 x6 x?xf32 >
16481648}
16491649
0 commit comments