Skip to content

[SYCL] Handle massive warnings comming from DPCPP lib #1583

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

fadeeval
Copy link
Contributor

@fadeeval fadeeval commented Apr 24, 2020

Handle massive warnings comming from DPCPP lib.

Signed-off-by: Aleksander Fadeev [email protected]

Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

Please, don't use hard coded paths.

@@ -1,4 +1,4 @@
// RUN: %clangxx -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -fsycl %s -o %t.out
// RUN: %clangxx -I /localdisk2/icl/fadeeval/sycl_workspace/build/include/sycl -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version %s -o %t.out
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// RUN: %clangxx -I /localdisk2/icl/fadeeval/sycl_workspace/build/include/sycl -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version %s -o %t.out
// RUN: %clangxx -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version %s -o %t.out

@fadeeval fadeeval force-pushed the private/fadeeval/Massive_warnings_comming_from_DPCXX_lib branch from 04ab3cb to 45b2d41 Compare April 24, 2020 15:22
Copy link
Contributor

@romanovvlad romanovvlad left a comment

Choose a reason for hiding this comment

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

Ok overall. But what is dpcxx lib?

template <> size_t get##POSTFIX<0>() { return __spirv_##POSTFIX##_x(); } \
template <> size_t get##POSTFIX<1>() { return __spirv_##POSTFIX##_y(); } \
template <> size_t get##POSTFIX<2>() { return __spirv_##POSTFIX##_z(); }
template <> inline size_t get##POSTFIX<0>() { return __spirv_##POSTFIX##_x(); } \
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, clang-format the patch.

@@ -1,4 +1,4 @@
// RUN: %clangxx -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -fsycl %s -o %t.out
// RUN: %clangxx -I /localdisk2/icl/fadeeval/sycl_workspace/build/include/sycl -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version %s -o %t.out
Copy link
Contributor

Choose a reason for hiding this comment

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

What about "-pedantic" ? Should we add this option?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is "-pedantic"?

@fadeeval fadeeval changed the title [SYCL] Handle massive warnings comming from dpcxx lib [SYCL] Handle massive warnings comming from DPCPP lib Apr 27, 2020
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

I believe these __UNUSED_ON_SYCL_DEVICE and __UNUSED_ON_HOST should have some prefix to show these are from SYCL RT.
Also, is it possible to change these macro's to non-function-like?

@bader
Copy link
Contributor

bader commented Apr 28, 2020

I believe these __UNUSED_ON_SYCL_DEVICE and __UNUSED_ON_HOST should have some prefix to show these are from SYCL RT.
Also, is it possible to change these macro's to non-function-like?

I believe macro definitions should be avoided if possible and I think it's possible.

@fadeeval fadeeval force-pushed the private/fadeeval/Massive_warnings_comming_from_DPCXX_lib branch from f53df61 to 067e293 Compare April 28, 2020 15:22
@@ -263,7 +263,16 @@ class __SYCL_EXPORT_DEPRECATED("Replaced by in_order queue property")

namespace std {
template <> struct hash<cl::sycl::ordered_queue> {
Copy link
Contributor

Choose a reason for hiding this comment

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

@jbrodman, are you okay if we just remove this header file?

@@ -6,6 +6,7 @@ set(SYCL_INCLUDE "${SYCL_INCLUDE_BUILD_DIR}")
set(SYCL_TOOLS_SRC_DIR "${PROJECT_SOURCE_DIR}/tools/")
set(LLVM_BUILD_BINARY_DIRS "${LLVM_BINARY_DIR}/bin/")
set(LLVM_BUILD_LIBRARY_DIRS "${LLVM_BINARY_DIR}/lib/")
set(SOURCE_SYCL_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../include")
Copy link
Contributor

Choose a reason for hiding this comment

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

There is already sycl_inc_dir varible for that.

@@ -1,4 +1,4 @@
// RUN: %clangxx -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -I %sycl_source_libs_dir -Wall -Wextra -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version %s -o %t.out
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not sycl_include?

Copy link
Contributor Author

@fadeeval fadeeval Apr 30, 2020

Choose a reason for hiding this comment

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

sycl_include point to CL/sycl.hpp in the build directory, but I want that the path points to CL/sycl.hpp in the llvm directory. Otherwise -fsycl -I didn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the name that I gave is bad, I wanted to name it "%source_sycl_include", but mixed up. I will change it.

@fadeeval fadeeval force-pushed the private/fadeeval/Massive_warnings_comming_from_DPCXX_lib branch from a2351d8 to c9fdf67 Compare May 12, 2020 11:32
@fadeeval fadeeval requested a review from v-klochkov as a code owner May 12, 2020 11:32
@fadeeval fadeeval force-pushed the private/fadeeval/Massive_warnings_comming_from_DPCXX_lib branch 4 times, most recently from 71ad83b to 00f94fc Compare May 19, 2020 10:44
@fadeeval fadeeval dismissed stale reviews from MrSidims, Pennycook, and bader via c3f1836 May 20, 2020 09:35
@fadeeval fadeeval force-pushed the private/fadeeval/Massive_warnings_comming_from_DPCXX_lib branch from 3a74b50 to c3f1836 Compare May 20, 2020 09:35
@bader bader dismissed romanovvlad’s stale review May 20, 2020 10:12

Dismissing "change requested" for @romanovvlad.

smaslov-intel
smaslov-intel previously approved these changes May 20, 2020
againull
againull previously approved these changes May 20, 2020
@fadeeval fadeeval dismissed stale reviews from againull and smaslov-intel via de44543 May 21, 2020 07:26
@fadeeval fadeeval requested a review from a team as a code owner May 21, 2020 07:26
@@ -2,4 +2,3 @@

; REQUIRES: shell
; UNSUPPORTED: asan, ubsan, msan
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, remove all unrelated changes from your patch.

fadeeval added 8 commits May 21, 2020 15:32
Signed-off-by: Aleksander Fadeev <[email protected]>

Werror is added

Signed-off-by: Aleksander Fadeev <[email protected]>

Path fix

Signed-off-by: Aleksander Fadeev <[email protected]>

__SYCL_UNUSED_ARUMENT__

Signed-off-by: Aleksander Fadeev <[email protected]>

__SYCL_UNUSED_ARGUMENT__

Signed-off-by: Aleksander Fadeev <[email protected]>

path fix

Signed-off-by: Aleksander Fadeev <[email protected]>

Fix

Signed-off-by: Aleksander Fadeev <[email protected]>

usm_allocator.hpp fix

Signed-off-by: Aleksander Fadeev <[email protected]>

test setup

Signed-off-by: Aleksander Fadeev <[email protected]>

warnings.cpp path correction

Signed-off-by: Aleksander Fadeev <[email protected]>

Formatting

Signed-off-by: Aleksander Fadeev <[email protected]>

suppres depricate warning

Signed-off-by: Aleksander Fadeev <[email protected]>

Path creating

Signed-off-by: Aleksander Fadeev <[email protected]>

warnings.cpp fix

Signed-off-by: Aleksander Fadeev <[email protected]>

defines.hpp revert

Signed-off-by: Aleksander Fadeev <[email protected]>

ordered_queue.cpp fix

Signed-off-by: Aleksander Fadeev <[email protected]>

Path improvement

Signed-off-by: Aleksander Fadeev <[email protected]>

Formatting 3

Signed-off-by: Aleksander Fadeev <[email protected]>

pragma fix

Signed-off-by: Aleksander Fadeev <[email protected]>

FIX rebase

Signed-off-by: Aleksander Fadeev <[email protected]>

Formatting3

Signed-off-by: Aleksander Fadeev <[email protected]>

orderes_queue.hpp fix

Signed-off-by: Aleksander Fadeev <[email protected]>

Formatting4

Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: Aleksander Fadeev <[email protected]>
Signed-off-by: Aleksander Fadeev <[email protected]>
@fadeeval fadeeval force-pushed the private/fadeeval/Massive_warnings_comming_from_DPCXX_lib branch from 8b5b08a to 735e7b8 Compare May 21, 2020 12:42
@@ -1,4 +1,4 @@
// RUN: %clangxx -Wall -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version -fsycl %s -o %t.out
// RUN: %clangxx -fsycl --no-system-header-prefix=CL/ -Wall -Wextra -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wunused-variable -Wmismatched-tags -Wunneeded-internal-declaration -Werror -Wno-unknown-cuda-version %s -o %t.out
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor note: --no-system-header-prefix=CL/ will most likely enable this check in non-SYCL headers e.g. OpenCL/L0.

I would also add -c option to save on linking time.

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 will do it by separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to save compile time, wouldn't "-fsyntax-only" be even better than "-c" ?

@fadeeval
Copy link
Contributor Author

@turinevgeny, @v-klochkov, @MrSidims, @againull, @smaslov-intel, @AlexeySachkov, @Pennycook, @jbrodman, approve please if no objections

@bader bader merged commit e0f59e3 into intel:sycl May 21, 2020
@fadeeval fadeeval deleted the private/fadeeval/Massive_warnings_comming_from_DPCXX_lib branch June 1, 2020 14:12
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…ntel/llvm-test-suite#1596)

intel#1583 introduced a clang-format issue. This fixes the issue.

---------

Signed-off-by: Maronas, Marcos <[email protected]>
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.

10 participants