Skip to content

[SYCL] Fix compile error for handler::copy with -fsycl-unnamed-lambda #903

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

AlexeySachkov
Copy link
Contributor

Some copy methods in handler are implemented via parallel_for for
host device and hence, we need to have KernelInfo struct (provided by
integration header) to compile them.
This effectively creates cyclic dependency and we already have some kind
of a workaround for it for regular mode (without -fsycl-unnamed-lambda).

This patch applies the same solution for unnamed lambda mechanism.

romanovvlad
romanovvlad previously approved these changes Dec 4, 2019
cl::sycl::buffer<int> Buf(Size);

Q.submit([&](cl::sycl::handler &CGH) {
auto Acc = Buf.get_access<cl::sycl::access::mode::write>(CGH);
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor. Not sure that we need so heavy test to just check that there is no compile time error.

Copy link
Contributor Author

@AlexeySachkov AlexeySachkov Dec 5, 2019

Choose a reason for hiding this comment

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

I have removed several RUN lines to leave only compilation for this test.
I would like to leave the code as-is to be able to execute it if it necessary to check that it actually works

Some `copy` methods in handler are implemented via `parallel_for` for
host device and hence, we need to have `KernelInfo` struct (provided by
integration header) to compile them.
This effectively creates cyclic dependency and we already have some kind
of a workaround for it for regular mode (without -fsycl-unnamed-lambda).

This patch applies the same solution for unnamed lambda mechanism.

Signed-off-by: Alexey Sachkov <[email protected]>
@AlexeySachkov AlexeySachkov force-pushed the private/asachkov/fix-handler-copy-with-unnamed-lambda-flag branch from 1764595 to 87e0981 Compare December 5, 2019 18:26
@bader bader merged commit e73d2ce into intel:sycl Dec 6, 2019
@AlexeySachkov AlexeySachkov deleted the private/asachkov/fix-handler-copy-with-unnamed-lambda-flag branch December 6, 2019 13:33
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