From da8cfb84990b8031e46dbd7bde96230348b126a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Wed, 6 Nov 2024 16:02:30 +0100 Subject: [PATCH 1/3] Revert "Disable temporarily failing CI job with ICX compiler" This reverts commit e8cde28437c067e0c73a381147260206d45bdeba. --- .github/workflows/reusable_basic.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable_basic.yml b/.github/workflows/reusable_basic.yml index 5866f939e7..ab4c8061b5 100644 --- a/.github/workflows/reusable_basic.yml +++ b/.github/workflows/reusable_basic.yml @@ -74,15 +74,15 @@ jobs: disable_hwloc: 'OFF' link_hwloc_statically: 'OFF' # test icx compiler - # - os: 'ubuntu-22.04' - # build_type: Release - # compiler: {c: icx, cxx: icpx} - # shared_library: 'ON' - # level_zero_provider: 'ON' - # cuda_provider: 'ON' - # install_tbb: 'ON' - # disable_hwloc: 'OFF' - # link_hwloc_statically: 'OFF' + - os: 'ubuntu-22.04' + build_type: Release + compiler: {c: icx, cxx: icpx} + shared_library: 'ON' + level_zero_provider: 'ON' + cuda_provider: 'ON' + install_tbb: 'ON' + disable_hwloc: 'OFF' + link_hwloc_statically: 'OFF' # test without installing TBB - os: 'ubuntu-22.04' build_type: Release From e94647d1bf0f6cc4c1388cd9c41b187cf2ef028d Mon Sep 17 00:00:00 2001 From: Krzysztof Filipek Date: Tue, 7 Jan 2025 12:32:33 +0100 Subject: [PATCH 2/3] Change linking to static for ICX Intel libraries --- .github/workflows/reusable_basic.yml | 3 +-- .github/workflows/reusable_sanitizers.yml | 1 - CMakeLists.txt | 6 ++++++ test/CMakeLists.txt | 8 +++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable_basic.yml b/.github/workflows/reusable_basic.yml index ab4c8061b5..83542efbbe 100644 --- a/.github/workflows/reusable_basic.yml +++ b/.github/workflows/reusable_basic.yml @@ -182,8 +182,7 @@ jobs: - name: Run tests working-directory: ${{env.BUILD_DIR}} run: | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} - ctest --output-on-failure # run all tests for better coverage + LD_LIBRARY_PATH=${{env.BUILD_DIR}}/lib/ ctest --output-on-failure # run all tests for better coverage - name: Check coverage if: ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' }} diff --git a/.github/workflows/reusable_sanitizers.yml b/.github/workflows/reusable_sanitizers.yml index f9e121f889..93752ff846 100644 --- a/.github/workflows/reusable_sanitizers.yml +++ b/.github/workflows/reusable_sanitizers.yml @@ -77,7 +77,6 @@ jobs: ASAN_OPTIONS: allocator_may_return_null=1 TSAN_OPTIONS: allocator_may_return_null=1 run: | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} ctest --output-on-failure windows-build: diff --git a/CMakeLists.txt b/CMakeLists.txt index f9cfc3a073..6c4f4e4c6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,12 @@ include(CMakePackageConfigHelpers) include(GNUInstallDirs) find_package(PkgConfig) +if(CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") + # Compiler dependencies needs to be in library path or to be linked + # statically + add_link_options(-static-intel) +endif() + # Build Options option(UMF_BUILD_SHARED_LIBRARY "Build UMF as shared library" OFF) option(UMF_BUILD_LEVEL_ZERO_PROVIDER "Build Level Zero memory provider" ON) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 04ebfe1098..7eed07e09e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,10 +1,16 @@ -# Copyright (C) 2022-2024 Intel Corporation +# Copyright (C) 2022-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED YES) +if(CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") + # Compiler dependencies needs to be in library path or to be linked + # statically + add_link_options(-static-intel) +endif() + include(FetchContent) FetchContent_Declare( googletest From e34952096ae5c6ea3e5368ba7f9625f740e8d52c Mon Sep 17 00:00:00 2001 From: Krzysztof Filipek Date: Thu, 9 Jan 2025 15:22:12 +0100 Subject: [PATCH 3/3] Remove all Intel libs from main library --- CMakeLists.txt | 6 ------ cmake/helpers.cmake | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c4f4e4c6a..f9cfc3a073 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,12 +33,6 @@ include(CMakePackageConfigHelpers) include(GNUInstallDirs) find_package(PkgConfig) -if(CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") - # Compiler dependencies needs to be in library path or to be linked - # statically - add_link_options(-static-intel) -endif() - # Build Options option(UMF_BUILD_SHARED_LIBRARY "Build UMF as shared library" OFF) option(UMF_BUILD_LEVEL_ZERO_PROVIDER "Build Level Zero memory provider" ON) diff --git a/cmake/helpers.cmake b/cmake/helpers.cmake index 56692ff6ec..2d14e2f45f 100644 --- a/cmake/helpers.cmake +++ b/cmake/helpers.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2023-2024 Intel Corporation +# Copyright (C) 2023-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -378,6 +378,9 @@ function(add_umf_library) elseif(LINUX) target_link_options(${ARG_NAME} PRIVATE "-Wl,--version-script=${ARG_LINUX_MAP_FILE}") + if(CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM") + target_link_options(${ARG_NAME} PRIVATE -no-intel-lib) + endif() endif() endif()