Skip to content

[MLIR][Linalg] linalg.pack verifier asserts "static tile size can't be zero" when an SSA tile is arith.constant 0 and there is no padding_value #239943

Open

Description

@YuanchengJiang

The following code:

func.func @f(%src: tensor<128x256xf32>, %dest: tensor<?x?x?x?xf32>) -> tensor<?x?x?x?xf32> {
  %c0 = arith.constant 0 : index
  %pack = linalg.pack %src inner_dims_pos = [0, 1] inner_tiles = [%c0, %c0] into %dest
      : tensor<128x256xf32> -> tensor<?x?x?x?xf32>
  return %pack : tensor<?x?x?x?xf32>
}

Resulted in this output:

Program terminated with signal SIGFPE (8)
Stack dump:
 #3 mlir::linalg::PackOp::requirePaddingValue
 #4 mlir::linalg::PackOp::verify
 #5 mlir::RegisteredOperationName::Model::verifyInvariants
 #6 (anonymous namespace)::OperationVerifier::verifyOnEntrance
 #7 (anonymous namespace)::OperationVerifier::verifyOperation
 #8 (anonymous namespace)::OperationVerifier::verifyOperation
 #9 mlir::verify
#10 mlir::parseAsmSourceFile

Trunk reproducer: https://godbolt.org/z/TnG86b6K7

Activity

  1. added
    crashPrefer [crash-on-valid] or [crash-on-invalid]
    generated by fuzzerRegression test generated by fuzzing or AI analysis - not a real world code snippet
    on Nov 7, 2026
  2. llvmorg-github-actions commented on Nov 7, 2026

    @llvmorg-github-actions

    @llvm/issue-subscribers-mlir-linalg

    Author: Jiang Yuancheng (YuanchengJiang)

    Details The following code: ```mlir func.func @f(%src: tensor<128x256xf32>, %dest: tensor<?x?x?x?xf32>) -> tensor<?x?x?x?xf32> { %c0 = arith.constant 0 : index %pack = linalg.pack %src inner_dims_pos = [0, 1] inner_tiles = [%c0, %c0] into %dest : tensor<128x256xf32> -> tensor<?x?x?x?xf32> return %pack : tensor<?x?x?x?xf32> } ```

    Resulted in this output:

    Program terminated with signal SIGFPE (8)
    Stack dump:
     #<!-- -->3 mlir::linalg::PackOp::requirePaddingValue
     #<!-- -->4 mlir::linalg::PackOp::verify
     #<!-- -->5 mlir::RegisteredOperationName::Model::verifyInvariants
     #<!-- -->6 (anonymous namespace)::OperationVerifier::verifyOnEntrance
     #<!-- -->7 (anonymous namespace)::OperationVerifier::verifyOperation
     #<!-- -->8 (anonymous namespace)::OperationVerifier::verifyOperation
     #<!-- -->9 mlir::verify
    #<!-- -->10 mlir::parseAsmSourceFile
    

    Trunk reproducer: https://godbolt.org/z/TnG86b6K7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]generated by fuzzerRegression test generated by fuzzing or AI analysis - not a real world code snippetmlir:linalg

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions