Skip to content

[SYCL] Fix the integration header generation for kernel with typedefs. #535

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

Conversation

alexeyvoronov-intel
Copy link
Contributor

Added printing policy with the canonical types flag enabled to
generation declarations of templated kernel function types and
specializations of KernelInfo for kernel function types.

Before this change for single_task/parallel_for<class kernel>
where T is type alias (typedef/using) in the integration header
remained the alias without defining what it is.

Example:
//// SYCL code
using type_t = int; template<type_t N> class kernel;
single_task<class kernel<0>>(...

//// generated integration header
// This is auto-generated SYCL integration header.

// Forward declarations of templated kernel function types:
template <type_t N> class kernel;

Signed-off-by: Alexey Voronov [email protected]

bader
bader previously approved these changes Aug 22, 2019
@bader
Copy link
Contributor

bader commented Aug 22, 2019

Will help to fix #130?

@alexeyvoronov-intel
Copy link
Contributor Author

Will help to fix #130?

Yes.

@bader
Copy link
Contributor

bader commented Aug 22, 2019

Closes #130

@bader
Copy link
Contributor

bader commented Aug 23, 2019

@tfzhu, do you know why buildbot hasn't started builds for this PR?
It was approved yesterday.

@alexeyvoronov-intel
Copy link
Contributor Author

@tfzhu ping. Help plz.

Added printing policy with the canonical types flag enabled to
generation declarations of templated kernel function types and
specializations of KernelInfo for kernel function types.

Before this change for single_task/parallel_for<class kernel<T>>
where T is type alias (typedef/using) in the integration header
remained the alias without defining what it is.

Example:
//// SYCL code
using type_t = int; template<type_t N> class kernel;
single_task<class kernel<0>>(...

//// generated integration header
// This is auto-generated SYCL integration header.

// Forward declarations of templated kernel function types:
template <type_t N> class kernel;

Signed-off-by: Alexey Voronov <[email protected]>
asavonic
asavonic previously approved these changes Aug 27, 2019
Copy link
Contributor

@asavonic asavonic left a comment

Choose a reason for hiding this comment

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

Let's start testing on this.

@asavonic asavonic self-requested a review August 27, 2019 10:23
@alexeyvoronov-intel
Copy link
Contributor Author

@bader
Tests passed.

@bader bader merged commit a784071 into intel:sycl Aug 27, 2019
@alexeyvoronov-intel alexeyvoronov-intel deleted the private/avoronov/kernel_name_with_typedefs branch September 12, 2019 13: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