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

[Relay] Check if the attribute "name" exists before accessing it #14485

Merged

Conversation

NicolaLancellotti
Copy link
Contributor

I found that some models fail to compile with tvm when the target is: compute-library, llvm -mtriple=aarch64-linux-gnu -mattr=+v8.2a,+neon

The error is: AttributeError: <class 'tvm.ir.expr.GlobalVar'> has no attribute name.

This patch checks if the attribute name exists before accessing it, and solves the compilation issues that I had, producing the expected result during the following inference.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Apr 4, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@NicolaLancellotti NicolaLancellotti force-pushed the relay/check-attribute-name-exists branch from c341e1a to 57f4e98 Compare April 4, 2023 15:14
Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ekalda ekalda merged commit 7a73254 into apache:main Apr 5, 2023
@ekalda
Copy link
Contributor

ekalda commented Apr 5, 2023

Thanks @NicolaLancellotti!

@NicolaLancellotti NicolaLancellotti deleted the relay/check-attribute-name-exists branch October 13, 2023 18:14
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

Successfully merging this pull request may close these issues.

3 participants