iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.47k stars 548 forks source link

Change calculation of reassociation indicies in ConvertConvToChannelsLast.cpp #17668

Closed IanWood1 closed 1 week ago

IanWood1 commented 1 week ago

Before (verification error)

%30042 = "tensor.expand_shape"(%30041) 
    <{reassociation = [[0, 1], [2, 3], [4], [5]], 
        static_output_shape = array<i64: 1, 1, 3, 3, 320, 4>}> 
    : (tensor<3x3x320x4xi8>) -> tensor<1x1x3x3x320x4xi8>

After

%30042 = "tensor.expand_shape"(%30041) 
    <{reassociation = [[0, 1, 2], [3], [4], [5]], 
        static_output_shape = array<i64: 1, 1, 3, 3, 320, 4>}> 
    : (tensor<3x3x320x4xi8>) -> tensor<1x1x3x3x320x4xi8>

https://github.com/iree-org/iree/issues/17643