Closed iviarcio closed 4 days ago
@llvm/issue-subscribers-mlir-linalg
Author: Marcio M Pereira (iviarcio)
I'm not able to reproduce this. Could you attach the mlir file and tell us which commit this was tested on?
Thanks ubfx for addressing this issue. I'm attaching the mlir file in zip format and the commit. It's quite recent because I updated my branch to check if the bug had been fixed:
commit d5dd7d230ecaf8242f4429a5e3653e16bf55bcd6 depthwise.zip
Thank you, now I could reproduce. The problem in this case is a malformed IR, the transform Op should have the type of the operand in ()
:
%res = transform.structured.generalize %conv : (!transform.op<"linalg.depthwise_conv_2d_nhwc_hwcm">) -> !transform.any_op
// instead of
%res = transform.structured.generalize %conv : !transform.op<"linalg.depthwise_conv_2d_nhwc_hwcm"> -> !transform.any_op
Obviously, the compiler still shouldn't crash on malformed IR and I'll see if this can be fixed.
Thank you and I apologize for the delay.
I'm trying to generalize a linalg convolution (see code below) and the compiler crashed (see the file crash.txt attached).
// RUN: mlir-opt "$1".mlir --pass-pipeline=" \ // RUN: builtin.module(transform-interpreter{ \ // RUN: debug-bind-trailing-args=linalg.depthwise_conv_2d_nhwc_hwcm},canonicalize,cse,symbol-dce)" \ // RUN: -o "$1"_opt.mlir
// Original depthwise_conv_2d_nhwc_hwcm to be converted into generic. func.func @depthwise_conv_2d_nhwc_hwcm(%input: tensor<2x4x5x2xf32>, %filter: tensor<2x2x2x3xf32>, %output: tensor<2x3x4x2x3xf32>) { %depw = linalg.depthwise_conv_2d_nhwc_hwcm { dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64> } ins(%input, %filter : tensor<2x4x5x2xf32>, tensor<2x2x2x3xf32>) outs(%output : tensor<2x3x4x2x3xf32>) -> tensor<2x3x4x2x3xf32> return %depw : tensor<2x3x4x2x3xf32> }
module attributes {transform.with_named_sequence} {
transform.named_sequence @__transform_main( %arg0: !transform.any_op, %conv: !transform.op<"linalg.depthwise_conv_2d_nhwc_hwcm">) {
} }