Skip to content

[gpu] 'func.func' op uses 401920 bytes of shared memory; exceeded the limit of 65536 bytes #18603

Closed

Description

@pdhirajkumarprasad

What happened?

For the given IR

module {
  func.func @main_graph(%arg0: !torch.vtensor<[1,3,224,224],f32>, %arg1: !torch.vtensor<[1,288,56,56],f32>, %arg2: !torch.vtensor<[288,72,3,3],f32>, %arg3: !torch.vtensor<[288],f32>, %arg4: !torch.vtensor<[36,288,1,1],f32>, %arg5: !torch.vtensor<[36],f32>, %arg6: !torch.vtensor<[1,288,1,1],f32>, %arg7: !torch.vtensor<[288,36,1,1],f32>, %arg8: !torch.vtensor<[288],f32>, %arg9: !torch.vtensor<[288,288,1,1],f32>, %arg10 : !torch.vtensor<[288],f32>, %arg11: !torch.vtensor<[1,288,28,28],si8>   ) -> !torch.vtensor<[1,288,28,28],f32>  attributes {torch.onnx_meta.ir_version = 8 : si64, torch.onnx_meta.opset_version = 21 : si64, torch.onnx_meta.opset_versions = {ai.onnx.contrib = 1 : si64, ai.onnx.ml = 4 : si64, ai.onnx.preview.training = 1 : si64, ai.onnx.training = 1 : si64, com.microsoft = 1 : si64, com.microsoft.experimental = 1 : si64, com.microsoft.nchwc = 1 : si64, org.pytorch.aten = 1 : si64}, torch.onnx_meta.producer_name = "vai_q_onnx", torch.onnx_meta.producer_version = "1.17.0+43059a7"} {

    %136 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<si8>} : () -> !torch.vtensor<[],si8> 
    %137 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<6.250000e-02> : tensor<f32>} : () -> !torch.vtensor<[],f32> 
    %1627 = torch.operator "onnx.DequantizeLinear"(%arg11, %137, %136) : (!torch.vtensor<[1,288,28,28],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,28,28],f32> 
    %1628 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<[2, 3]> : tensor<2xsi64>} : () -> !torch.vtensor<[2],si64> 
    %1629 = torch.operator "onnx.ReduceMean"(%1627, %1628) {torch.onnx.keepdims = 1 : si64} : (!torch.vtensor<[1,288,28,28],f32>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[1,288,1,1],f32> 
    %1257 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<1.00488281> : tensor<f32>} : () -> !torch.vtensor<[],f32> 
    %1630 = torch.operator "onnx.Mul"(%1629, %1257) : (!torch.vtensor<[1,288,1,1],f32>, !torch.vtensor<[],f32>) -> !torch.vtensor<[1,288,1,1],f32> 
    %138 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<si8>} : () -> !torch.vtensor<[],si8> 
    %139 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<1.562500e-02> : tensor<f32>} : () -> !torch.vtensor<[],f32> 
    %1631 = torch.operator "onnx.QuantizeLinear"(%1630, %139, %138) : (!torch.vtensor<[1,288,1,1],f32>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],si8> 
    %1632 = torch.operator "onnx.DequantizeLinear"(%1631, %139, %138) : (!torch.vtensor<[1,288,1,1],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],f32> 
    %1633 = torch.operator "onnx.Conv"(%1632, %arg4, %arg5) {torch.onnx.dilations = [1 : si64, 1 : si64], torch.onnx.group = 1 : si64, torch.onnx.kernel_shape = [1 : si64, 1 : si64], torch.onnx.pads = [0 : si64, 0 : si64, 0 : si64, 0 : si64], torch.onnx.strides = [1 : si64, 1 : si64]} : (!torch.vtensor<[1,288,1,1],f32>, !torch.vtensor<[36,288,1,1],f32>, !torch.vtensor<[36],f32>) -> !torch.vtensor<[1,36,1,1],f32> 
    %1634 = torch.operator "onnx.Relu"(%1633) : (!torch.vtensor<[1,36,1,1],f32>) -> !torch.vtensor<[1,36,1,1],f32> 
    %146 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<si8>} : () -> !torch.vtensor<[],si8> 
    %147 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<3.125000e-02> : tensor<f32>} : () -> !torch.vtensor<[],f32> 
    %1635 = torch.operator "onnx.QuantizeLinear"(%1634, %147, %146) : (!torch.vtensor<[1,36,1,1],f32>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,36,1,1],si8> 
    %1636 = torch.operator "onnx.DequantizeLinear"(%1635, %147, %146) : (!torch.vtensor<[1,36,1,1],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,36,1,1],f32> 
    %1637 = torch.operator "onnx.Conv"(%1636, %arg7, %arg8) {torch.onnx.dilations = [1 : si64, 1 : si64], torch.onnx.group = 1 : si64, torch.onnx.kernel_shape = [1 : si64, 1 : si64], torch.onnx.pads = [0 : si64, 0 : si64, 0 : si64, 0 : si64], torch.onnx.strides = [1 : si64, 1 : si64]} : (!torch.vtensor<[1,36,1,1],f32>, !torch.vtensor<[288,36,1,1],f32>, !torch.vtensor<[288],f32>) -> !torch.vtensor<[1,288,1,1],f32> 
    %148 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<si8>} : () -> !torch.vtensor<[],si8> 
    %149 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<3.125000e-02> : tensor<f32>} : () -> !torch.vtensor<[],f32> 
    %1638 = torch.operator "onnx.QuantizeLinear"(%1637, %149, %148) : (!torch.vtensor<[1,288,1,1],f32>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],si8> 
    %1639 = torch.operator "onnx.DequantizeLinear"(%1638, %149, %148) : (!torch.vtensor<[1,288,1,1],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],f32> 
    %1640 = torch.operator "onnx.Sigmoid"(%1639) : (!torch.vtensor<[1,288,1,1],f32>) -> !torch.vtensor<[1,288,1,1],f32> 
    %156 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<si8>} : () -> !torch.vtensor<[],si8> 
    %157 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<7.812500e-03> : tensor<f32>} : () -> !torch.vtensor<[],f32> 
    %1641 = torch.operator "onnx.QuantizeLinear"(%1640, %157, %156) : (!torch.vtensor<[1,288,1,1],f32>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],si8> 
    %1642 = torch.operator "onnx.DequantizeLinear"(%1641, %157, %156) : (!torch.vtensor<[1,288,1,1],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],f32> 
    %1643 = torch.operator "onnx.Mul"(%1627, %1642) : (!torch.vtensor<[1,288,28,28],f32>, !torch.vtensor<[1,288,1,1],f32>) -> !torch.vtensor<[1,288,28,28],f32> 
    %158 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<si8>} : () -> !torch.vtensor<[],si8> 
    %159 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<7.812500e-03> : tensor<f32>} : () -> !torch.vtensor<[],f32> 
    %1644 = torch.operator "onnx.QuantizeLinear"(%1643, %159, %158) : (!torch.vtensor<[1,288,28,28],f32>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,28,28],si8> 
    %1645 = torch.operator "onnx.DequantizeLinear"(%1644, %159, %158) : (!torch.vtensor<[1,288,28,28],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,28,28],f32> 
    %1646 = torch.operator "onnx.Conv"(%1645, %arg9, %arg10) {torch.onnx.dilations = [1 : si64, 1 : si64], torch.onnx.group = 1 : si64, torch.onnx.kernel_shape = [1 : si64, 1 : si64], torch.onnx.pads = [0 : si64, 0 : si64, 0 : si64, 0 : si64], torch.onnx.strides = [1 : si64, 1 : si64]} : (!torch.vtensor<[1,288,28,28],f32>, !torch.vtensor<[288,288,1,1],f32>, !torch.vtensor<[288],f32>) -> !torch.vtensor<[1,288,28,28],f32> 
    return %1646 : !torch.vtensor<[1,288,28,28],f32>
  }
}

getting error as

failed to translate executables
issue2/model.torch_onnx.mlir:14:13: error: 'func.func' op uses 401920 bytes of shared memory; exceeded the limit of 65536 bytes
    %1632 = torch.operator "onnx.DequantizeLinear"(%1631, %139, %138) : (!torch.vtensor<[1,288,1,1],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],f32> 
            ^
issue2/model.torch_onnx.mlir:14:13: error: failed to run translation of source executable to target executable for backend #hal.executable.target<"rocm", "rocm-hsaco-fb", {iree.gpu.target = #iree_gpu.target<arch = "gfx942", features = "", wgp = <compute =  fp64|fp32|fp16|int64|int32|int16|int8, storage =  b64|b32|b16|b8, subgroup =  shuffle|arithmetic, dot =  dp4xi8toi32, mma = [<MFMA_F32_16x16x4_F32>, <MFMA_F32_16x16x16_F16>, <MFMA_F32_32x32x8_F16>, <MFMA_F32_16x16x32_F8E4M3FNUZ>, <MFMA_I32_16x16x32_I8>, <MFMA_I32_32x32x16_I8>], subgroup_size_choices = [64], max_workgroup_sizes = [1024, 1024, 1024], max_thread_count_per_workgroup = 1024, max_workgroup_memory_bytes = 65536, max_workgroup_counts = [2147483647, 2147483647, 2147483647]>>, ukernels = "none"}>
    %1632 = torch.operator "onnx.DequantizeLinear"(%1631, %139, %138) : (!torch.vtensor<[1,288,1,1],si8>, !torch.vtensor<[],f32>, !torch.vtensor<[],si8>) -> !torch.vtensor<[1,288,1,1],f32> 
            ^

dump.log with following flag enabled '--mlir-print-ir-after-all --mlir-print-ir-before-all --mlir-disable-threading --mlir-elide-elementsattrs-if-larger=4'

dump.log

Steps to reproduce your issue

this issue is present only in GPU. it's passing inference in CPU

command to reproduce the issue:

iree-compile --iree-input-type=auto --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=rocm model.mlir

What component(s) does this issue relate to?

Compiler

Version information

No response

Additional context

No response

Activity

  1. added
    bug 🐞
    on Sep 26, 2024
  2. nirvedhmeshram commented on Oct 1, 2024

    @nirvedhmeshram
    Contributor

    The problem is this dispatch

    #map = affine_map<(d0, d1, d2) -> (d0, d1, d2)>
    #map1 = affine_map<(d0, d1, d2) -> (d0)>
    #map2 = affine_map<(d0) -> (d0)>
    module {
      func.func @main_graph$async_dispatch_1_generic_288x28x28_f32(%arg0: tensor<288x28x28xi8>) -> tensor<288xf32> {
        %cst = arith.constant 6.250000e-02 : f32
        %cst_0 = arith.constant 7.840000e+02 : f32
        %cst_1 = arith.constant 1.00488281 : f32
        %cst_2 = arith.constant 1.562500e-02 : f32
        %cst_3 = arith.constant 0.000000e+00 : f32
        %cst_4 = arith.constant -1.280000e+02 : f32
        %cst_5 = arith.constant 1.270000e+02 : f32
        %0 = tensor.empty() : tensor<288xf32>
        %1 = linalg.fill ins(%cst_3 : f32) outs(%0 : tensor<288xf32>) -> tensor<288xf32>
        %2 = tensor.empty() : tensor<288x28x28xf32>
        %3 = linalg.generic {indexing_maps = [#map, #map], 
                iterator_types = ["parallel", "parallel", "parallel"]} 
                ins(%arg0 : tensor<288x28x28xi8>) outs(%2 : tensor<288x28x28xf32>) {
        ^bb0(%in: i8, %out: f32):
          %6 = arith.extsi %in : i8 to i32
          %7 = arith.sitofp %6 : i32 to f32
          %8 = arith.mulf %7, %cst : f32
          linalg.yield %8 : f32
        } -> tensor<288x28x28xf32>
        %4 = linalg.generic {indexing_maps = [#map, #map1], 
                 iterator_types = ["parallel", "reduction", "reduction"]} 
                 ins(%3 : tensor<288x28x28xf32>) outs(%1 : tensor<288xf32>) {
        ^bb0(%in: f32, %out: f32):
          %6 = arith.addf %in, %out : f32
          linalg.yield %6 : f32
        } -> tensor<288xf32>
        %5 = linalg.generic {indexing_maps = [#map2, #map2], 
                 iterator_types = ["parallel"]} ins(%4 : tensor<288xf32>) outs(%0 : tensor<288xf32>) {
        ^bb0(%in: f32, %out: f32):
          %6 = arith.divf %in, %cst_0 : f32
          %7 = arith.mulf %6, %cst_1 : f32
          %8 = arith.divf %7, %cst_2 : f32
          %9 = math.roundeven %8 : f32
          %10 = arith.addf %9, %cst_3 : f32
          %11 = arith.maximumf %10, %cst_4 : f32
          %12 = arith.minimumf %11, %cst_5 : f32
          %13 = arith.fptosi %12 : f32 to i8
          %14 = arith.extsi %13 : i8 to i32
          %15 = arith.sitofp %14 : i32 to f32
          %16 = arith.mulf %15, %cst_2 : f32
          linalg.yield %16 : f32
        } -> tensor<288xf32>
        return %5 : tensor<288xf32>
      }
    }
    

    You can see that %4 can be folded into %3 and then this would be a more sane dispatch that the backend can compile but that doesnt happen in the dispatch creation stage because %3 had other users.

    I am able to compile if I add elementwise fusion after createCloneProducersIntoDispatchRegionsPass and removing this guard in the elementwise fusion

    if (!IREE::Flow::isNonNullAndOutsideDispatch({producer, consumer})) {
              return false;
    }
    
  3. moved this from Done to In Progress in IREE Compilation Errorson Oct 1, 2024
  4. nirvedhmeshram commented on Oct 1, 2024

    @nirvedhmeshram
    Contributor

    I just tried #18474 and interestingly the failing dispatch passes but the next one fails on it, here is a full dump
    This is the failing IR/pass

    input_ir.mlir:15:13: error: Yield operand #0 is not equivalent to the corresponding iter bbArg
        %1633 = torch.operator "onnx.Conv"(%1632, %arg4, %arg5) {torch.onnx.dilations = [1 : si64, 1 : si64], torch.onnx.group = 1 : si64, torch.onnx.kernel_shape = [1 : si64, 1 : si64], torch.onnx.pads = [0 : si64, 0 : si64, 0 : si64, 0 : si64], torch.onnx.strides = [1 : si64, 1 : si64]} : (!torch.vtensor<[1,288,1,1],f32>, !torch.vtensor<[36,288,1,1],f32>, !torch.vtensor<[36],f32>) -> !torch.vtensor<[1,36,1,1],f32> 
                ^
    input_ir.mlir:15:13: note: see current operation: "scf.yield"(%42) : (tensor<1x1xf32>) -> ()
    // -----// IR Dump After EliminateEmptyTensorsPass Failed (iree-eliminate-empty-tensors) //----- //
    func.func @main_graph$async_dispatch_2_matmul_36x1x288_f32() attributes {translation_info = #iree_codegen.translation_info<LLVMGPUTileAndFuse workgroup_size = [64, 1, 1] subgroup_size = 64>} {
      %cst = arith.constant dense<1.270000e+02> : vector<1x1xf32>
      %cst_0 = arith.constant dense<-1.280000e+02> : vector<1x1xf32>
      %cst_1 = arith.constant dense<3.125000e-02> : vector<1x1xf32>
      %cst_2 = arith.constant dense<0.000000e+00> : vector<1x1xf32>
      %c4 = arith.constant 4 : index
      %c288 = arith.constant 288 : index
      %cst_3 = arith.constant 0.000000e+00 : f32
      %c0 = arith.constant 0 : index
      %c903168 = arith.constant 903168 : index
      %c904320 = arith.constant 904320 : index
      %0 = hal.interface.binding.subspan layout(<bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, Indirect>], flags = Indirect>) binding(0) alignment(64) offset(%c0) flags("ReadOnly|Indirect") : !flow.dispatch.tensor<readonly:tensor<36x288xf32>>
      %1 = hal.interface.binding.subspan layout(<bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, Indirect>], flags = Indirect>) binding(1) alignment(64) offset(%c903168) flags("ReadOnly|Indirect") : !flow.dispatch.tensor<readonly:tensor<288x1xf32>>
      %2 = hal.interface.binding.subspan layout(<bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, Indirect>], flags = Indirect>) binding(2) alignment(64) offset(%c0) flags("ReadOnly|Indirect") : !flow.dispatch.tensor<readonly:tensor<36x1xf32>>
      %3 = hal.interface.binding.subspan layout(<bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, Indirect>], flags = Indirect>) binding(3) alignment(64) offset(%c904320) flags(Indirect) : !flow.dispatch.tensor<writeonly:tensor<36x1xf32>>
      %workgroup_id_x = hal.interface.workgroup.id[0] : index
      %4 = flow.dispatch.tensor.load %3, offsets = [%workgroup_id_x, 0], sizes = [1, 1], strides = [1, 1] : !flow.dispatch.tensor<writeonly:tensor<36x1xf32>> -> tensor<1x1xf32>
      %5 = flow.dispatch.tensor.load %1, offsets = [0, 0], sizes = [288, 1], strides = [1, 1] : !flow.dispatch.tensor<readonly:tensor<288x1xf32>> -> tensor<288x1xf32>
      %6 = flow.dispatch.tensor.load %0, offsets = [%workgroup_id_x, 0], sizes = [1, 288], strides = [1, 1] : !flow.dispatch.tensor<readonly:tensor<36x288xf32>> -> tensor<1x288xf32>
      %7 = tensor.empty() : tensor<1x1xf32>
      %8 = vector.transfer_write %cst_2, %7[%c0, %c0] {in_bounds = [true, true]} : vector<1x1xf32>, tensor<1x1xf32>
      %9 = flow.dispatch.tensor.load %2, offsets = [%workgroup_id_x, 0], sizes = [1, 1], strides = [1, 1] : !flow.dispatch.tensor<readonly:tensor<36x1xf32>> -> tensor<1x1xf32>
      %10 = scf.forall (%arg0, %arg1) in (1, 1) shared_outs(%arg2 = %4) -> (tensor<1x1xf32>) {
        %11 = scf.for %arg3 = %c0 to %c288 step %c4 iter_args(%arg4 = %8) -> (tensor<1x1xf32>) {
          %27 = vector.transfer_read %6[%arg0, %arg3], %cst_3 {in_bounds = [true, true]} : tensor<1x288xf32>, vector<1x4xf32>
          %28 = vector.transfer_read %5[%arg3, %arg1], %cst_3 {in_bounds = [true, true]} : tensor<288x1xf32>, vector<4x1xf32>
          %29 = vector.contract {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d2)>, affine_map<(d0, d1, d2) -> (d2, d1)>, affine_map<(d0, d1, d2) -> (d0, d1)>], iterator_types = ["parallel", "parallel", "reduction"], kind = #vector.kind<add>} %27, %28, %cst_2 : vector<1x4xf32>, vector<4x1xf32> into vector<1x1xf32>
          %30 = vector.transfer_write %29, %7[%c0, %c0] {in_bounds = [true, true]} : vector<1x1xf32>, tensor<1x1xf32>
          scf.yield %30 : tensor<1x1xf32>
        }
        %extracted_slice = tensor.extract_slice %arg2[%arg0, %arg1] [1, 1] [1, 1] : tensor<1x1xf32> to tensor<1x1xf32>
        %12 = vector.transfer_read %11[%c0, %c0], %cst_3 {in_bounds = [true, true]} : tensor<1x1xf32>, vector<1x1xf32>
        %13 = vector.transfer_read %9[%arg0, %arg1], %cst_3 {in_bounds = [true, true]} : tensor<1x1xf32>, vector<1x1xf32>
        %14 = arith.addf %12, %13 : vector<1x1xf32>
        %15 = arith.cmpf ugt, %14, %cst_2 : vector<1x1xf32>
        %16 = arith.select %15, %14, %cst_2 : vector<1x1xi1>, vector<1x1xf32>
        %17 = arith.divf %16, %cst_1 : vector<1x1xf32>
        %18 = math.roundeven %17 : vector<1x1xf32>
        %19 = arith.addf %18, %cst_2 : vector<1x1xf32>
        %20 = arith.maximumf %19, %cst_0 : vector<1x1xf32>
        %21 = arith.minimumf %20, %cst : vector<1x1xf32>
        %22 = arith.fptosi %21 : vector<1x1xf32> to vector<1x1xi8>
        %23 = arith.extsi %22 : vector<1x1xi8> to vector<1x1xi32>
        %24 = arith.sitofp %23 : vector<1x1xi32> to vector<1x1xf32>
        %25 = arith.mulf %24, %cst_1 : vector<1x1xf32>
        %26 = vector.transfer_write %25, %extracted_slice[%c0, %c0] {in_bounds = [true, true]} : vector<1x1xf32>, tensor<1x1xf32>
        scf.forall.in_parallel {
          tensor.parallel_insert_slice %26 into %arg2[%arg0, %arg1] [1, 1] [1, 1] : tensor<1x1xf32> into tensor<1x1xf32>
        }
      } {mapping = [#gpu.thread<linear_dim_1>, #gpu.thread<linear_dim_0>]}
      flow.dispatch.tensor.store %10, %3, offsets = [%workgroup_id_x, 0], sizes = [1, 1], strides = [1, 1] : tensor<1x1xf32> -> !flow.dispatch.tensor<writeonly:tensor<36x1xf32>>
      return
    }
    

    cc @qedawkins

  5. qedawkins commented on Oct 1, 2024

    @qedawkins
    Contributor

    Thanks for the triage, I can help take a look.

  6. nirvedhmeshram commented on Oct 1, 2024

    @nirvedhmeshram
    Contributor

    We have the above issue fixed in #18657 and once #18474 also lands, this IR will work.

  7. pdhirajkumarprasad commented on Oct 15, 2024

    @pdhirajkumarprasad
    Author

    I still this issue with

    IREE (https://iree.dev):
      IREE compiler version 20241013.1045 @ 1f3382d7305d7b2920fe7cb6072b07ca81945f28
      LLVM version 20.0.0git
      Optimized build
    

    command:

    iree-opt -pass-pipeline='builtin.module(func.func(convert-torch-onnx-to-torch))' model.torch_onnx.mlir -o model.torch.mlir 
    iree-opt -pass-pipeline='builtin.module(torch-lower-to-backend-contract,func.func(torch-scalarize-shapes),torch-shape-refinement-pipeline,torch-backend-to-linalg-on-tensors-backend-pipeline)' model.torch.mlir -o model.modified.mlir
    iree-compile model.modified.mlir --iree-hal-target-backends=rocm --iree-hip-target=gfx942 -o compiled_model.vmfb
    
  8. nirvedhmeshram commented on Oct 15, 2024

    @nirvedhmeshram
    Contributor

    Yes #18474 has not landed yet. I will ping here when we can try it again.

  9. nirvedhmeshram commented on Oct 15, 2024

    @nirvedhmeshram
    Contributor

    Just FYI, the reason #18474 is not landed yet is there are numeric differences with it on some onnx models so we are making sure the numerics are correct before landing it.

  10. nirvedhmeshram commented on Oct 25, 2024

    @nirvedhmeshram
    Contributor

    A continuation of this issue will be #18905

  11. pdhirajkumarprasad commented on Mar 4, 2025

    @pdhirajkumarprasad
    Author

    issue not present in IREE compiler version 3.3.0rc20250303 @ cc37664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug 🐞

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions