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

[compiler] VM translation of Module to bytecode crashes #18300

Open
sogartar opened this issue Aug 20, 2024 · 2 comments
Open

[compiler] VM translation of Module to bytecode crashes #18300

sogartar opened this issue Aug 20, 2024 · 2 comments
Assignees
Labels
bug 🐞 Something isn't working

Comments

@sogartar
Copy link
Contributor

What happened?

I got a segfault in mlir::iree_compiler::IREE::VM::translateModuleToBytecode.
Here is a vm-translate-to-bytecode-crash.zip.

Steps to reproduce your issue

Use compile.sh in the ZIP.

What component(s) does this issue relate to?

Compiler

Version information

#18217

Additional context

No response

@sogartar sogartar added the bug 🐞 Something isn't working label Aug 20, 2024
@sogartar sogartar self-assigned this Aug 20, 2024
@sogartar
Copy link
Contributor Author

It turned out that I had missing dialect_resources. program-with-dialect-resources.zip has the missing IR.
During verification of util.global we should probably check if the referenced resource is missing.

util.global private @__constant_tensor_4x6x5x5xf32 {inlining_policy = #util.inline.never, stream.affinity.default = #hal.device.affinity<@__device_0>} = dense_resource<torch_tensor_4_6_5_5_torch.float32> : tensor<4x6x5x5xf32>

@benvanik
Copy link
Collaborator

benvanik commented Aug 21, 2024

Ah yeah, someone hit this the other day when they incorrectly deleted required resources. MLIR should be checking this kind of thing, if anything - resources are an MLIR concept. Globals aren't enough to validate as any op or attribute can reference resources and we can't always be exhaustively checking them all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants