Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `this->isReferenceToStorage(I) && "Insertion iterator is out of bounds."' failed. Error in Unsqueezing multiple dims #912

Open
pravg-amd opened this issue Feb 10, 2025 · 0 comments

Comments

@pravg-amd
Copy link

For the below IR

module {
  func.func @maskrcnn(%arg0: !torch.vtensor<[],f32>) -> !torch.vtensor<[?,?,?,?],f32> attributes {torch.onnx_meta.ir_version = 8 : si64, torch.onnx_meta.opset_version = 21 : si64, torch.onnx_meta.producer_name = "pytorch", torch.onnx_meta.producer_version = "2.1.0"} {
    %cst = torch.operator "onnx.Constant"() {torch.onnx.value = dense_resource<__874> : tensor<1xsi64>} : () -> !torch.vtensor<[1],si64>
    %0 = torch.operator "onnx.Unsqueeze"(%arg0, %cst) : (!torch.vtensor<[],f32>, !torch.vtensor<[1],si64>) -> !torch.vtensor<[?,?,?,?],f32>
    return %0 : !torch.vtensor<[?,?,?,?],f32>
  }
}

{-#
  dialect_resources: {
    builtin: {
    __874: "0x080000000100000000000000"
    }
  }
#-}

Getting the error

iree-compile: ~/iree/third_party/llvm-project/llvm/include/llvm/ADT/SmallVector.h:780: iterator llvm::SmallVectorImpl<long>::insert_one_impl(iterator, ArgType &&) [T = long, ArgType = long]: Assertion `this->isReferenceToStorage(I) && "Insertion iterator is out of bounds."' failed.

Command

 iree-compile --iree-hal-target-backends=llvm-cpu --iree-llvmcpu-target-cpu=host -o test.vmfb model_torch_onnx.mlir 

Models Impacted:

maskrcnn_resnet50_fpn_v2_Opset16_torchvision
maskrcnn_resnet50_fpn_v2_Opset17_torchvision
maskrcnn_resnet50_fpn_v2_Opset18_torchvision

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant