Skip to content

[CI] Do not enable assertions by default in configure.py script #17616

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
build_cache_root: "/__w/"
build_artifact_suffix: "default"
build_cache_suffix: "default"
build_configure_extra_args: --enable-assertions
Copy link
Contributor

Choose a reason for hiding this comment

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

how about we put this in the ci-defaults section of the configure.py script instead of yaml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be a default in the CI? IIUC, for Linux, we enable assertions only in Nightly and pre-commit, but not during post-commit.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah okay i see, yeah i guess lets not change it now

# Docker image has last nightly pre-installed and added to the PATH
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
cc: clang
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sycl-macos-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
cd $GITHUB_WORKSPACE/build
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
--enable-assertions \
--ci-defaults $ARGS \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
build_cache_root: "/__w/"
build_artifact_suffix: default
build_configure_extra_args: '--hip --cuda'
build_configure_extra_args: '--enable-assertions --hip --cuda'
build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest
retention-days: 90

Expand All @@ -31,7 +31,7 @@ jobs:
build_cache_root: "/__w/"
build_cache_suffix: sprod_shared
build_artifact_suffix: sprod_shared
build_configure_extra_args: '--shared-libs --hip --cuda --native_cpu'
build_configure_extra_args: '--enable-assertions --shared-libs --hip --cuda --native_cpu'

artifact_archive_name: sycl_linux_shared.tar.zst

Expand All @@ -43,7 +43,7 @@ jobs:
build_cache_root: "/__w/"
build_cache_suffix: oneapi
build_artifact_suffix: oneapi
build_configure_extra_args: -DCMAKE_C_FLAGS="-no-intel-lib -ffp-model=precise" -DCMAKE_CXX_FLAGS="-no-intel-lib -ffp-model=precise"
build_configure_extra_args: --enable-assertions -DCMAKE_C_FLAGS="-no-intel-lib -ffp-model=precise" -DCMAKE_CXX_FLAGS="-no-intel-lib -ffp-model=precise"
cc: icx
cxx: icpx

Expand Down Expand Up @@ -156,6 +156,7 @@ jobs:
# We upload both Linux/Windows build via Github's "Releases"
# functionality, make sure Linux/Windows names follow the same pattern.
artifact_archive_name: sycl_windows.tar.gz
build_configure_extra_args: --enable-assertions

e2e-win:
needs: build-win
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sycl-post-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
build_cache_root: "/__w/llvm"
build_cache_suffix: default
build_artifact_suffix: default
build_configure_extra_args: --no-assertions --hip --cuda --native_cpu -DSYCL_ENABLE_STACK_PRINTING=ON -DSYCL_LIB_WITH_DEBUG_SYMBOL=ON
build_configure_extra_args: --hip --cuda --native_cpu -DSYCL_ENABLE_STACK_PRINTING=ON -DSYCL_LIB_WITH_DEBUG_SYMBOL=ON

e2e-lin:
needs: [detect_changes, build-lin]
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
uses: ./.github/workflows/sycl-windows-build.yml
with:
compiler: icx
build_configure_extra_args: -DCMAKE_C_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_CXX_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_EXE_LINKER_FLAGS=/manifest:no -DCMAKE_MODULE_LINKER_FLAGS=/manifest:no -DCMAKE_SHARED_LINKER_FLAGS=/manifest:no
build_configure_extra_args: --enable-assertions -DCMAKE_C_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_CXX_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_EXE_LINKER_FLAGS=/manifest:no -DCMAKE_MODULE_LINKER_FLAGS=/manifest:no -DCMAKE_SHARED_LINKER_FLAGS=/manifest:no
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: We enable assertions when testing on windows in pre, post-commit and nightly. For more coverage, we should disable assertions in post-commit - that's what we also do for Linux.

build_cache_suffix: icx

e2e-win:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/sycl-rel-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
build_cache_root: "/__w/"
build_artifact_suffix: default
build_configure_extra_args: '--hip --cuda'
build_configure_extra_args: '--enable-assertions --hip --cuda'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KornevNikita I'll create a followup PR to disable assertions in release branch.

build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest
build_ref: sycl-rel-6_1_0

Expand Down Expand Up @@ -105,6 +105,7 @@ jobs:
# We upload both Linux/Windows build via Github's "Releases"
# functionality, make sure Linux/Windows names follow the same pattern.
artifact_archive_name: sycl_windows.tar.gz
build_configure_extra_args: --enable-assertions

e2e-win:
needs: build-win
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sycl-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
build_cache_root: "/__w/"
build_artifact_suffix: default
build_configure_extra_args: ''
build_configure_extra_args: '--enable-assertions'

# This job builds SYCL-CTS with -fsycl-use-spirv-backend-for-spirv-gen.
build-sycl-cts:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sycl-windows-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
uses: ./.github/workflows/sycl-windows-build.yml
with:
changes: ${{ needs.detect_changes.outputs.filters }}
build_configure_extra_args: "--enable-assertions"

e2e:
needs: build
Expand Down
8 changes: 4 additions & 4 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def do_configure(args, passthrough_args):
sycl_build_pi_hip_platform = "AMD"
sycl_clang_extra_flags = ""
sycl_werror = "OFF"
llvm_enable_assertions = "ON"
llvm_enable_assertions = "OFF"
llvm_enable_doxygen = "OFF"
llvm_enable_sphinx = "OFF"
llvm_build_shared_libs = "OFF"
Expand Down Expand Up @@ -122,8 +122,8 @@ def do_configure(args, passthrough_args):
sycl_werror = "ON"
xpti_enable_werror = "ON"

if args.no_assertions:
llvm_enable_assertions = "OFF"
if args.enable_assertions:
llvm_enable_assertions = "ON"

if args.docs:
llvm_enable_sphinx = "ON"
Expand Down Expand Up @@ -357,7 +357,7 @@ def main():
help="build compiler with all supported targets, it doesn't change runtime build",
)
parser.add_argument(
"--no-assertions", action="store_true", help="build without assertions"
"--enable-assertions", action="store_true", help="Build with assertions."
)
parser.add_argument(
"--docs", action="store_true", help="build Doxygen documentation"
Expand Down
Loading