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

UB fix #1053

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

UB fix #1053

wants to merge 1 commit into from

Conversation

newling
Copy link
Contributor

@newling newling commented Jan 22, 2025

Since #1033 I have not been able to compile all the way to xclbin, because the value of options.emitCtrlPkt over here in the code when I print it is 17, even though the default value is false (0).

I don't know where the bug is, iree-amd-aie, iree, or the clang C++ compiler I'm using. I've spent some time trying to find some invalid code, but without any success. The change in this PR fixes my problem, although it's definitely just a workaround for another deeper issue (initializing with {false} instead of = false should be valid afaik).

The only nice thing about this PR is that IREE initializes options with = false instead of {false}, so at least we're aligning with IREE.

Copy link
Collaborator

@jtuyls jtuyls left a comment

Choose a reason for hiding this comment

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

Euh, this shouldn't make a difference afaik..

Not sure about IREE, and in most cases it doesn't matter too much, but list initialization is preferred by the developer of C++ and it should be the version that always works: https://stackoverflow.com/questions/18222926/what-are-the-advantages-of-list-initialization-using-curly-braces?rq=1

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.

2 participants