Skip to content

Commit

Permalink
move shared to nightly
Browse files Browse the repository at this point in the history
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
  • Loading branch information
sarnex committed Aug 15, 2024
1 parent bcac42f commit 14d4c52
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 28 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,6 @@ jobs:
run: |
cmake --build $GITHUB_WORKSPACE/build --target install-clang-libraries
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-libraries
- name: Additional Install for "--shared-libs" HIP build
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') && contains(inputs.build_configure_extra_args, '--hip')}}
# Building for HIP requires lld, however in a shared library build lld depends on shared libraries that are not installed as part of the SYCL toolchain, so copy over the
# statically-built lld executable from the build image.
run: |
PREINSTALLED_CLANG_PATH=`which clang`
PREINSTALLED_INSTALL_DIR=`echo $PREINSTALLED_CLANG_PATH | rev | cut -c7- | rev`
cp "${PREINSTALLED_INSTALL_DIR}/lld" $GITHUB_WORKSPACE/build/install/bin/
cp "${PREINSTALLED_INSTALL_DIR}/ld.lld" $GITHUB_WORKSPACE/build/install/bin/
- name: Pack toolchain
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ jobs:
# prefer widespread gzip compression.
artifact_archive_name: sycl_linux.tar.gz

ubuntu2204_shared_build:
if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl-linux-build.yml
secrets: inherit
with:
build_cache_root: "/__w/"
build_cache_suffix: sprod_shared
build_artifact_suffix: default
build_configure_extra_args: '--shared-libs --hip --cuda'
merge_ref: ''

artifact_archive_name: sycl_linux_shared.tar.zst

ubuntu2204_test:
needs: [ubuntu2204_build]
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sycl-post-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ permissions: read-all

jobs:
build-lin:
name: Linux (Self build + shared libraries + no-assertions)
name: Linux (Self build + no-assertions)
if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl-linux-build.yml
with:
build_cache_root: "/__w/llvm"
build_cache_suffix: sprod_shared
build_artifact_suffix: sprod_shared
build_configure_extra_args: --shared-libs --no-assertions --hip --cuda --native_cpu --cmake-opt="-DSYCL_ENABLE_STACK_PRINTING=ON" --cmake-opt="-DSYCL_LIB_WITH_DEBUG_SYMBOL=ON"
build_cache_suffix: sprod_static
build_artifact_suffix: sprod_static
build_configure_extra_args: --no-assertions --hip --cuda --native_cpu --cmake-opt="-DSYCL_ENABLE_STACK_PRINTING=ON" --cmake-opt="-DSYCL_LIB_WITH_DEBUG_SYMBOL=ON"
# Docker image has last nightly pre-installed and added to the PATH
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build"
cc: clang
Expand All @@ -60,7 +60,7 @@ jobs:
reset_intel_gpu: true
- name: AMD/HIP
runner: '["Linux", "amdgpu"]'
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
target_devices: ext_oneapi_hip:gpu
reset_intel_gpu: false
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
ref: ${{ github.sha }}
merge_ref: ''

sycl_toolchain_artifact: sycl_linux_sprod_shared
sycl_toolchain_artifact: sycl_linux_sprod_static
sycl_toolchain_archive: ${{ needs.build-lin.outputs.artifact_archive_name }}
sycl_toolchain_decompress_command: ${{ needs.build-lin.outputs.artifact_decompress_command }}

Expand Down
6 changes: 1 addition & 5 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ def do_configure(args):
sycl_enabled_backends.append("level_zero")

# lld is needed on Windows or for the HIP plugin on AMD
# For shared library builds, a preinstalled lld is used
# at runtime.
if platform.system() == "Windows" or (
args.hip and args.hip_platform == "AMD" and not args.shared_libs
):
if platform.system() == "Windows" or (args.hip and args.hip_platform == "AMD"):
llvm_enable_projects += ";lld"

libclc_enabled = args.cuda or args.hip or args.native_cpu
Expand Down
11 changes: 3 additions & 8 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,10 @@ if("hip" IN_LIST SYCL_ENABLE_BACKENDS)
message(FATAL_ERROR
"HIP support requires adding \"libclc\" to the CMake argument \"LLVM_ENABLE_PROJECTS\"")
endif()
find_program(
SYSTEM_LLD
NAMES
lld
DOC "Pre-installed system lld executable"
)
if(NOT TARGET lld AND "${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "AMD" AND NOT SYSTEM_LLD)

if(NOT TARGET lld AND "${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "AMD")
message(FATAL_ERROR
"HIP support requires adding \"lld\" to the CMake argument \"LLVM_ENABLE_PROJECTS\" or installing a pre-built lld")
"HIP support requires adding \"lld\" to the CMake argument \"LLVM_ENABLE_PROJECTS\"")
endif()

add_dependencies(sycl-toolchain ur_adapter_hip)
Expand Down

0 comments on commit 14d4c52

Please sign in to comment.