Skip to content

[SYCL] Fix int-footer spec-const generation for deduced types. #3908

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

Merged
merged 8 commits into from
Jun 11, 2021

Conversation

erichkeane
Copy link
Contributor

Apparently my initial implementation documented the need to do this, but
never did! We collect SpecConstants (the vector), and add ones we don't
know if they are SpecConstants. However, the previous implementation
forgot to skip the VarDecls that were later deduced to be a different
type.

Apparently my initial implementation documented the need to do this, but
never did!  We collect SpecConstants (the vector), and add ones we don't
know if they are SpecConstants. However, the previous implementation
forgot to skip the VarDecls that were later deduced to be a different
type.
@erichkeane
Copy link
Contributor Author

All of those make sense to me, done @AlexeySachkov

AlexeySachkov
AlexeySachkov previously approved these changes Jun 10, 2021

// Skip if this isn't a SpecIdType. This can happen if it was a deduced
// type.
if (!Util::isSyclSpecIdType(VD->getType().getCanonicalType()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we always want isSyclSpecIdType() to inspect the canonical type (e.g., sink the calls to getCanonicalType() into the definition of the function rather than letting the caller decide which to pass)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we do, yes. All we care about is whether this is a spec-id type, we don't really care about whether it is wrapped in typedefs or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, then I'd change the implementation of isSyclSpecIdType() to do the canonicalization rather than adding the calls here. I don't care if that's a follow-up or done as part of this patch though. WDYT?

Copy link
Contributor Author

@erichkeane erichkeane Jun 10, 2021

Choose a reason for hiding this comment

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

You're right here, we probably want the entire list of isNNNType functions in Util to canonicalize. I'll look into doing it in a follow-up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

LGTM!

@erichkeane
Copy link
Contributor Author

@bader @AlexeySachkov is the SYCL :: ESIMD/private_memory/pm_access_3.cpp test failure a 'known issue'? I'm not sure how this patch could cause it, and it seems pm_access_1.cpp is already failed before this patch.

@AlexeySachkov
Copy link
Contributor

@bader @AlexeySachkov is the SYCL :: ESIMD/private_memory/pm_access_3.cpp test failure a 'known issue'? I'm not sure how this patch could cause it, and it seems pm_access_1.cpp is already failed before this patch.

@erichkeane, yes, I disabled pm_access tests in intel/llvm-test-suite#282 due to unrelated failures in them, but they seem to be re-enabled again in intel/llvm-test-suite#306

@bader bader requested a review from AlexeySachkov June 11, 2021 08:11
@bader bader merged commit 7d6de80 into intel:sycl Jun 11, 2021
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.

5 participants