Skip to content

Create general PoolingOp and decompose to MaxPool2d #1489

Create general PoolingOp and decompose to MaxPool2d

Create general PoolingOp and decompose to MaxPool2d #1489

GitHub Actions / MLIR Tests failed Nov 5, 2024 in 0s

219 tests run, 208 passed, 7 skipped, 4 failed.

Annotations

Check failure on line 12 in ttmlir/Conversion/StableHLOToTTIR

See this annotation in the file changed.

@github-actions github-actions / MLIR Tests

ttmlir/Conversion/StableHLOToTTIR.maxpool2d_op.mlir

Exit Code: 1
Raw output
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --stablehlo-to-ttir-pipeline /__w/tt-mlir/tt-mlir/test/ttmlir/Conversion/StableHLOToTTIR/maxpool2d_op.mlir | /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Conversion/StableHLOToTTIR/maxpool2d_op.mlir
+ /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Conversion/StableHLOToTTIR/maxpool2d_op.mlir
+ /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --stablehlo-to-ttir-pipeline /__w/tt-mlir/tt-mlir/test/ttmlir/Conversion/StableHLOToTTIR/maxpool2d_op.mlir
/__w/tt-mlir/tt-mlir/test/ttmlir/Conversion/StableHLOToTTIR/maxpool2d_op.mlir:12:12: error: CHECK: expected string not found in input
 // CHECK: %[[C:.*]] = "ttir.max_pool2d"[[C:.*]]
           ^
<stdin>:5:38: note: scanning from here
 %1 = tensor.empty() : tensor<1xbf16>
                                     ^
<stdin>:8:2: note: possible intended match here
 %4 = "ttir.pooling"(%arg0, %3) <{base_dilations = array<i64: 1, 1, 1, 1>, operandSegmentSizes = array<i32: 1, 1>, operand_constraints = [#any_device_tile, #any_device_tile], padding = array<i64: 0, 0, 1, 1, 1, 1, 0, 0>, pooling_method = #ttir<pooling_method Max>, window_dilations = array<i64: 1, 1, 1, 1>, window_dimensions = array<i64: 1, 3, 3, 1>, window_strides = array<i64: 1, 2, 2, 1>}> : (tensor<1x128x128x32xbf16>, tensor<1x64x64x32xbf16>) -> tensor<1x64x64x32xbf16>
 ^

Input file: <stdin>
Check file: /__w/tt-mlir/tt-mlir/test/ttmlir/Conversion/StableHLOToTTIR/maxpool2d_op.mlir

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: #any_device_tile = #tt.operand_constraint<dram|l1|tile|none|interleaved|single_bank|height_sharded|width_sharded|block_sharded|any_layout|any_device_tile> 
            2: module { 
            3:  func.func public @test_maxpool2d(%arg0: tensor<1x128x128x32xbf16>) -> tensor<1x64x64x32xbf16> { 
            4:  %0 = "ttir.constant"() <{value = dense<0xFF80> : tensor<1xbf16>}> : () -> tensor<1xbf16> 
            5:  %1 = tensor.empty() : tensor<1xbf16> 
check:12'0                                          X error: no match found
            6:  %2 = "ttir.broadcast"(%0, %1) <{dimension = [], operand_constraints = [#any_device_tile, #any_device_tile]}> : (tensor<1xbf16>, tensor<1xbf16>) -> tensor<1xbf16> 
check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            7:  %3 = tensor.empty() : tensor<1x64x64x32xbf16> 
check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8:  %4 = "ttir.pooling"(%arg0, %3) <{base_dilations = array<i64: 1, 1, 1, 1>, operandSegmentSizes = array<i32: 1, 1>, operand_constraints = [#any_device_tile, #any_device_tile], padding = array<i64: 0, 0, 1, 1, 1, 1, 0, 0>, pooling_method = #ttir<pooling_method Max>, window_dilations = array<i64: 1, 1, 1, 1>, window_dimensions = array<i64: 1, 3, 3, 1>, window_strides = array<i64: 1, 2, 2, 1>}> : (tensor<1x128x128x32xbf16>, tensor<1x64x64x32xbf16>) -> tensor<1x64x64x32xbf16> 
check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:12'1      ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           possible intended match
            9:  return %4 : tensor<1x64x64x32xbf16> 
check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10:  } 
check:12'0     ~~~
           11: } 
check:12'0     ~~
           12:  
check:12'0     ~
>>>>>>

--

Check failure on line 24 in ttmlir/Dialect/TTNN

See this annotation in the file changed.

@github-actions github-actions / MLIR Tests

ttmlir/Dialect/TTNN.simple_constant.mlir

Exit Code: 1
Raw output
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/simple_constant.mlir | /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/simple_constant.mlir
+ /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/simple_constant.mlir
+ /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/simple_constant.mlir
/__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/simple_constant.mlir:24:12: error: CHECK: expected string not found in input
 // CHECK: %[[C:.*]] = "ttnn.full"[[C:.*]]
           ^
<stdin>:19:112: note: scanning from here
 %1 = "ttnn.full"(%0) <{fillValue = 1.000000e+00 : f32}> : (!tt.device<#device>) -> tensor<64x128xi32, #layout>
                                                                                                               ^
<stdin>:24:2: note: possible intended match here
 %1 = "ttnn.empty"() <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<row_major>, shape = #ttnn.shape<64x128>}> : () -> tensor<64x128xf32, #layout1>
 ^

Input file: <stdin>
Check file: /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/simple_constant.mlir

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           14:  %1 = "ttnn.empty"() <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<row_major>, shape = #ttnn.shape<64x128>}> : () -> tensor<64x128xf32, #layout1> 
           15:  return %1 : tensor<64x128xf32, #layout1> 
           16:  } 
           17:  func.func @test_full_int() -> tensor<64x128xi32, #layout> { 
           18:  %0 = "ttnn.get_device"() <{mesh_shape = #ttnn<mesh_shape 1x1>}> : () -> !tt.device<#device> 
           19:  %1 = "ttnn.full"(%0) <{fillValue = 1.000000e+00 : f32}> : (!tt.device<#device>) -> tensor<64x128xi32, #layout> 
check:24'0                                                                                                                    X error: no match found
           20:  return %1 : tensor<64x128xi32, #layout> 
check:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           21:  } 
check:24'0     ~~~
           22:  func.func @test_full_float() -> tensor<64x128xf32, #layout1> { 
check:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  %0 = "ttnn.get_device"() <{mesh_shape = #ttnn<mesh_shape 1x1>}> : () -> !tt.device<#device> 
check:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24:  %1 = "ttnn.empty"() <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<row_major>, shape = #ttnn.shape<64x128>}> : () -> tensor<64x128xf32, #layout1> 
check:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:24'1      ?                                                                                                                                                                possible intended match
           25:  return %1 : tensor<64x128xf32, #layout1> 
check:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           26:  } 
check:24'0     ~~~
           27: } 
check:24'0     ~~
           28:  
check:24'0     ~
>>>>>>

--

Check failure on line 1 in ttmlir/Silicon/TTNN/pooling

See this annotation in the file changed.

@github-actions github-actions / MLIR Tests

ttmlir/Silicon/TTNN/pooling.simple_pooling.mlir

Exit Code: 2
Raw output
Exit Code: 2

Command Output (stderr):
--
RUN: at line 1: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=" /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/pooling/simple_pooling.mlir > /__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/pooling/Output/simple_pooling.mlir.tmp.mlir
+ /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline=system-desc-path= /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/pooling/simple_pooling.mlir
RUN: at line 2: /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/pooling/simple_pooling.mlir --input-file=/__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/pooling/Output/simple_pooling.mlir.tmp.mlir
+ /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/pooling/simple_pooling.mlir --input-file=/__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/pooling/Output/simple_pooling.mlir.tmp.mlir
error: no check strings found with prefix 'CHECK:'

--

Check failure on line 30 in ttmlir/Silicon/TTNN

See this annotation in the file changed.

@github-actions github-actions / MLIR Tests

ttmlir/Silicon/TTNN.simple_constant.mlir

Exit Code: 1
Raw output
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=" /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/simple_constant.mlir > /__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/Output/simple_constant.mlir.tmp.mlir
+ /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline=system-desc-path= /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/simple_constant.mlir
RUN: at line 2: /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/simple_constant.mlir --input-file=/__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/Output/simple_constant.mlir.tmp.mlir
+ /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/simple_constant.mlir --input-file=/__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/Output/simple_constant.mlir.tmp.mlir
/__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/simple_constant.mlir:32:12: error: CHECK: expected string not found in input
 // CHECK: %[[C:.*]] = "ttnn.full"[[C:.*]]
           ^
/__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/Output/simple_constant.mlir.tmp.mlir:25:112: note: scanning from here
 %1 = "ttnn.full"(%0) <{fillValue = 1.000000e+00 : f32}> : (!tt.device<#device>) -> tensor<64x128xi32, #layout>
                                                                                                               ^
/__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/Output/simple_constant.mlir.tmp.mlir:30:2: note: possible intended match here
 %1 = "ttnn.empty"() <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<row_major>, shape = #ttnn.shape<64x128>}> : () -> tensor<64x128xf32, #layout1>
 ^

Input file: /__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/Output/simple_constant.mlir.tmp.mlir
Check file: /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/simple_constant.mlir

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           20:  %1 = "ttnn.empty"() <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<row_major>, shape = #ttnn.shape<1x1>}> : () -> tensor<1x1xf32, #layout2> 
           21:  return %1 : tensor<1x1xf32, #layout2> 
           22:  } 
           23:  func.func @test_full_int() -> tensor<64x128xi32, #layout> { 
           24:  %0 = "ttnn.get_device"() <{mesh_shape = #ttnn<mesh_shape 1x1>}> : () -> !tt.device<#device> 
           25:  %1 = "ttnn.full"(%0) <{fillValue = 1.000000e+00 : f32}> : (!tt.device<#device>) -> tensor<64x128xi32, #layout> 
check:32'0                                                                                                                    X error: no match found
           26:  return %1 : tensor<64x128xi32, #layout> 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           27:  } 
check:32'0     ~~~
           28:  func.func @test_full_float() -> tensor<64x128xf32, #layout1> { 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           29:  %0 = "ttnn.get_device"() <{mesh_shape = #ttnn<mesh_shape 1x1>}> : () -> !tt.device<#device> 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30:  %1 = "ttnn.empty"() <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<row_major>, shape = #ttnn.shape<64x128>}> : () -> tensor<64x128xf32, #layout1> 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:32'1      ?                                                                                                                                                                possible intended match
           31:  return %1 : tensor<64x128xf32, #layout1> 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           32:  } 
check:32'0     ~~~
           33:  func.func @test_full_scalar() -> tensor<1x1xf32, #layout2> { 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           34:  %0 = "ttnn.get_device"() <{mesh_shape = #ttnn<mesh_shape 1x1>}> : () -> !tt.device<#device> 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           35:  %1 = "ttnn.empty"() <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<row_major>, shape = #ttnn.shape<1x1>}> : () -> tensor<1x1xf32, #layout2> 
check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            .
            .
            .
>>>>>>

--