-
Notifications
You must be signed in to change notification settings - Fork 769
[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
[SYCL] Handle massive warnings comming from DPCPP lib #1583
Conversation
There was a problem hiding this 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.
sycl/test/warnings/warnings.cpp
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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 |
04ab3cb
to
45b2d41
Compare
There was a problem hiding this 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(); } \ |
There was a problem hiding this comment.
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.
sycl/test/warnings/warnings.cpp
Outdated
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "-pedantic"?
There was a problem hiding this 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?
I believe macro definitions should be avoided if possible and I think it's possible. |
f53df61
to
067e293
Compare
@@ -263,7 +263,16 @@ class __SYCL_EXPORT_DEPRECATED("Replaced by in_order queue property") | |||
|
|||
namespace std { | |||
template <> struct hash<cl::sycl::ordered_queue> { |
There was a problem hiding this comment.
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?
sycl/test/CMakeLists.txt
Outdated
@@ -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") |
There was a problem hiding this comment.
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.
sycl/test/warnings/warnings.cpp
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not sycl_include
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
a2351d8
to
c9fdf67
Compare
71ad83b
to
00f94fc
Compare
3a74b50
to
c3f1836
Compare
Dismissing "change requested" for @romanovvlad.
llvm/test/Bindings/Go/go.test
Outdated
@@ -2,4 +2,3 @@ | |||
|
|||
; REQUIRES: shell | |||
; UNSUPPORTED: asan, ubsan, msan |
There was a problem hiding this comment.
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.
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Werror is added Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Path fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> __SYCL_UNUSED_ARUMENT__ Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> __SYCL_UNUSED_ARGUMENT__ Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> path fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> usm_allocator.hpp fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> test setup Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> warnings.cpp path correction Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Formatting Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> suppres depricate warning Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Path creating Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> warnings.cpp fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> defines.hpp revert Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> ordered_queue.cpp fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Path improvement Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Formatting 3 Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> pragma fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> FIX rebase Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Formatting3 Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> orderes_queue.hpp fix Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com> Formatting4 Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
8b5b08a
to
735e7b8
Compare
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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" ?
@turinevgeny, @v-klochkov, @MrSidims, @againull, @smaslov-intel, @AlexeySachkov, @Pennycook, @jbrodman, approve please if no objections |
…ntel/llvm-test-suite#1596) intel#1583 introduced a clang-format issue. This fixes the issue. --------- Signed-off-by: Maronas, Marcos <marcos.maronas@intel.com>
Handle massive warnings comming from DPCPP lib.
Signed-off-by: Aleksander Fadeev aleksander.fadeev@intel.com