Skip to content

[SYCL] Modify configure script #1421

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

Merged
merged 3 commits into from
Apr 2, 2020

Conversation

hiaselhans
Copy link
Contributor

  • use "--no-ocl" by default -> new "--system-ocl" flag (use system
    OpenCl headers and do not download)
  • don't use "DSYCL_WERROR" by default, only on buildbot
  • don't exclude buildbot dir in gitignore

Signed-off-by: hiaselhans simon.klemenc@gmail.com

@hiaselhans hiaselhans changed the title modify configure script [SYCL][DOC] modify configure script Mar 28, 2020
Copy link
Contributor

@alexbatashev alexbatashev left a comment

Choose a reason for hiding this comment

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

Overall, I like the idea of new options. But I doubt these changes will be propagated to buildbot pre-commit. If I'm not mistaken, some changes on the server side are also required. Contents of .github/workflows/linux_postcommit.yml only affects post-commit builds.

Tagging @DoyleLi and @bader to comment on this.

@@ -35,7 +35,7 @@ jobs:
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release --no-ocl $ARGS
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release --werror $ARGS
Copy link
Contributor

@bader bader Mar 29, 2020

Choose a reason for hiding this comment

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

I would prefer to keep this option ON by default, so contributors can't miss new warnings locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no problem, i can swap this around, however i am noticing some -Werror=class-conversion:

FAILED: tools/sycl/source/CMakeFiles/sycl.dir/detail/builtins_math.cpp.o 
/usr/bin/c++  -DUSE_PI_CUDA -DXPTI_ENABLE_INSTRUMENTATION -DXPTI_STATIC_LIBRARY -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Dsycl_EXPORTS -Itools/sycl/source -IXXX/llvm/sycl/source -I/usr/include/libxml2 -Iinclude -IXXX/llvm/llvm/include -IXXX/llvm/xpti/include -IXXX/llvm/sycl/include -Itools/sycl/OpenCL/inc -isystem /opt/cuda/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wextra -Wno-deprecated-declarations -Werror -O3  -fPIC   -UNDEBUG -std=c++11 -MD -MT tools/sycl/source/CMakeFiles/sycl.dir/detail/builtins_math.cpp.o -MF tools/sycl/source/CMakeFiles/sycl.dir/detail/builtins_math.cpp.o.d -o tools/sycl/source/CMakeFiles/sycl.dir/detail/builtins_math.cpp.o -c XXX/llvm/sycl/source/detail/builtins_math.cpp
In file included from XXX/llvm/sycl/include/CL/sycl/types.hpp:53,
                 from XXX/llvm/sycl/source/detail/builtins_helper.hpp:12,
                 from XXX/llvm/sycl/source/detail/builtins_math.cpp:18:
XXX/llvm/sycl/include/CL/sycl/multi_ptr.hpp:520:3: error: converting ‘cl::sycl::multi_ptr<const void, Space>’ to the same type will never use a type conversion operator [-Werror=class-conversion]
  520 |   operator multi_ptr<const void, Space>() const {
      |   ^~~~~~~~

this comes using c++ (Arch Linux 9.3.0-1) 9.3.0.
The idea was to ease the path for people wanting to compile intel/llvm using werror=OFF.
This reveals another one:

In function ‘void cl::sycl::detail::initValue(const char*, const char*)’,
    inlined from ‘void cl::sycl::detail::readConfig()’ at XXX/llvm/sycl/source/detail/config.cpp:96:16:
XXX/llvm/sycl/source/detail/config.cpp:42:12: warning: ‘char* strncpy(char*, const char*, size_t)’ output may be truncated copying 1 byte from a string of length 255 [-Wstringop-truncation]
   42 |     strncpy(SYCLConfigBase<Name>::MStorage, Value, MaxSize);                   \
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XXX/llvm/sycl/source/detail/config.def:14:1: note: in expansion of macro ‘CONFIG’
   14 | CONFIG(SYCL_DISABLE_EXECUTION_GRAPH_CLEANUP, 1, __SYCL_DISABLE_EXECUTION_GRAPH_CLEANUP)
      | ^~~~~~

So, the most elegant would be to fix these and add a more recent version of g++ to buildbot.
Then make werror default but a flag to disable?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have a strong opinion on that. As long as CI prevents new warnings - I can configure my local builds as I want.

I'd like to hear what others think about this.

@bader bader changed the title [SYCL][DOC] modify configure script [SYCL] Modify configure script Mar 29, 2020
@hiaselhans
Copy link
Contributor Author

So, i will modify the pr to do only the following instead:

add --no-werr in order to compile on gcc >= 8.2. Solving the Wclass-conversion and Wstringop-truncation is out of scope for this PR.

for the --no-ocl vs --system-ocl i proposed to advice users to use no-ocl in the docs with #1368 but back then the prefered option was to make it default in the script.
I see that this requires modifying the buildbot, but on the other hand I feel that we should - by default - guide the potential user to the smoothest way to get started with this great compiler :)

Is that okay?

@bader
Copy link
Contributor

bader commented Mar 31, 2020

So, i will modify the pr to do only the following instead:

add --no-werr in order to compile on gcc >= 8.2. Solving the Wclass-conversion and Wstringop-truncation is out of scope for this PR.

for the --no-ocl vs --system-ocl i proposed to advice users to use no-ocl in the docs with #1368 but back then the prefered option was to make it default in the script.
I see that this requires modifying the buildbot, but on the other hand I feel that we should - by default - guide the potential user to the smoothest way to get started with this great compiler :)

Is that okay?

@hiaselhans, thanks!
--no-werr makes sense to me.

I would still proceed with --no-ocl -> --system-ocl change.
@alexbatashev, if I understand it correctly, buildbot "build" job will do unnecessary job with configuring OpenCL headers and ICD loader, but it still should continue to work.
Once this change is applied we can:

  1. Remove separate buildbot jobs configuring OpenCL headers and ICD loader.
  2. Pass --system-ocl option to skip configuring OpenCL headers and ICD loader during the "build" step.

@DoyleLi, does it make sense to you?

@hiaselhans
Copy link
Contributor Author

perfect, thanks @bader!

I will wait for #1434 to be merged and rebase on that.

as for --no-ocl - if you want that - I can also just leave it there for now and comment as "Unused", while the inverse --system-ocl is in place. Then we can remove it once the buildbot command is changed?

@bader
Copy link
Contributor

bader commented Mar 31, 2020

perfect, thanks @bader!

I will wait for #1434 to be merged and rebase on that.

#1434 is merged.

as for --no-ocl - if you want that - I can also just leave it there for now and comment as "Unused", while the inverse --system-ocl is in place. Then we can remove it once the buildbot command is changed?

AFAIK, BuildBot doesn't set --no-ocl option, so there is no reason to keep it.
@alexbatashev concerned that to keep the same behavior BuildBot must set a new option.
My argument is that it should be okay to change the behavior, but I'd great if @DoyleLi or @vladimirlaz to confirm.

 * use "--no-ocl" by default -> new "--system-ocl" flag (use system
   OpenCl headers and do not download)
 * don't use "DSYCL_WERROR" by default, only on buildbot
 * don't exclude buildbot dir in gitignore

Signed-off-by: hiaselhans <simon.klemenc@gmail.com>
@hiaselhans hiaselhans force-pushed the update_configure_script branch from c99de5b to 7aeb2d4 Compare March 31, 2020 17:30
Signed-off-by: hiaselhans <simon.klemenc@gmail.com>
@bader bader assigned vladimirlaz and unassigned bader Apr 1, 2020
bader
bader previously approved these changes Apr 1, 2020
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.

LGTM, but I'd like @vladimirlaz or @DoyleLi to approve before merging.

@bader bader merged commit 24f84ab into intel:sycl Apr 2, 2020
@hiaselhans
Copy link
Contributor Author

thanks! :)

alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Apr 6, 2020
…_private_api

* origin/sycl: (614 commits)
  [SYCL][Doc] Update prerequisites in GetStartedGuide (intel#1466)
  [SYCL][USM] Remove vestigial dead code (intel#1474)
  [SYCL-PTX] Fix __spirv_GroupAsyncCopy stride computation (intel#1451)
  [Driver][SYCL] Emit an error if c compilation is forced (intel#1438)
  [SYCL] Fix sycl-post-link when no split and symbols are requested. (intel#1454)
  [SYCL] Change priority of devices in default_selector (intel#1264)
  [CI] Update CODEOWNERS matching rules order (intel#1468)
  [SYCL] Share PFWG lambda object through shared memory (intel#1455)
  [CI] Fix CODEOWNERS file syntax (intel#1464)
  [SYCL][CUDA] Fix active context when creating base event (intel#1447)
  [SYCL] Diagnose implicit declaration of kernel function type (intel#1450)
  [BuildBot] Modify configure script (intel#1421)
  [SYCL] Resolve min/max conflict (intel#1339)
  [CI][BuildBot] Fix configure parameter to turn on/off assertions (intel#1449)
  [SYCL] XFAIL LIT test due to duplicate diagnostic
  [SYCL] Remove explicit sycl_device attribute requirement
  Apply more suggestions
  Apply suggestions
  Translate new set of Intel FPGA Loop Controls
  Translate Intel FPGA force_pow2_depth memory attribute
  ...
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Apr 15, 2020
…c_abi_checks

* origin/sycl: (625 commits)
  [SYCL][Test] Disable spec_const_redefine.cpp on all devices but HOST (intel#1488)
  [SYCL] Only export public API (intel#1456)
  [SYCL][CUDA] Fix selected_binary argument in piextDeviceSelectBinary (intel#1475)
  [SYCL] Enable LIT testing with CUDA BE (intel#1458)
  [SYCL] Fix float to half-type conversion (intel#1395)
  [NFC] Cleanup unneded macro from builtins implementation (intel#1445)
  Enable cfg-printer LLVM lit tests only if LLVM linked statically (intel#1479)
  [SYCL][NFC] Reflect the "allowlist" renaming in the code (intel#1480)
  [SYCL][Doc] Update prerequisites in GetStartedGuide (intel#1466)
  [SYCL][USM] Remove vestigial dead code (intel#1474)
  [SYCL-PTX] Fix __spirv_GroupAsyncCopy stride computation (intel#1451)
  [Driver][SYCL] Emit an error if c compilation is forced (intel#1438)
  [SYCL] Fix sycl-post-link when no split and symbols are requested. (intel#1454)
  [SYCL] Change priority of devices in default_selector (intel#1264)
  [CI] Update CODEOWNERS matching rules order (intel#1468)
  [SYCL] Share PFWG lambda object through shared memory (intel#1455)
  [CI] Fix CODEOWNERS file syntax (intel#1464)
  [SYCL][CUDA] Fix active context when creating base event (intel#1447)
  [SYCL] Diagnose implicit declaration of kernel function type (intel#1450)
  [BuildBot] Modify configure script (intel#1421)
  ...
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.

5 participants