-
Notifications
You must be signed in to change notification settings - Fork 808
[SYCL][NFC] Fix warnings coming out of SYCL headers. #3978
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,42 @@ | ||
| // RUN: %clangxx -fsycl --no-system-header-prefix=CL/sycl -fsyntax-only -Wall -Wextra -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -Wno-unused-parameter %s -o %t.out | ||
|
|
||
| // RUN: %clangxx -fsycl -E --no-system-header-prefix=CL/sycl %s -o %t.ii | ||
| // RUN: %clangxx -fsycl -fsyntax-only -Wall -Wextra -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -Wno-unused-parameter %t.ii -o %t.out | ||
|
||
| #include <CL/sycl.hpp> | ||
|
|
||
| using namespace cl::sycl; | ||
| int main() { | ||
| vec<long, 4> newVec; | ||
| queue myQueue; | ||
| buffer<vec<long, 4>, 1> resultBuf{&newVec, range<1>{1}}; | ||
| myQueue.submit([&](handler &cgh) { | ||
| auto event = myQueue.submit([&](handler &cgh) { | ||
| auto writeResult = resultBuf.get_access<access::mode::write>(cgh); | ||
| cgh.single_task<class kernel_name>([=]() { | ||
| writeResult[0] = (vec<int, 4>{1, 2, 3, 4}).template convert<long>(); | ||
| }); | ||
| }); | ||
| (void)event; | ||
| return 0; | ||
| } | ||
|
|
||
| // explicitly instantiate a few more classes to check if there are some issues | ||
| // with them: | ||
|
|
||
| namespace sycl { | ||
|
|
||
| template class buffer<vec<int, 3>, 2>; | ||
|
|
||
| template class accessor<int, 1>; | ||
| template class accessor<vec<float, 2>, 2, access_mode::read>; | ||
|
|
||
| template class marray<double, 7>; | ||
| template class marray<short, 3>; | ||
|
|
||
| template class kernel_bundle<bundle_state::input>; | ||
| template class kernel_bundle<bundle_state::objectj>; | ||
| template class kernel_bundle<bundle_state::executable>; | ||
|
|
||
| template class device_image<bundle_state::input>; | ||
| template class device_image<bundle_state::objectj>; | ||
| template class device_image<bundle_state::executable>; | ||
|
|
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.