This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 186
Add a profile for ICC-2022. #403
Merged
+142
−5
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b9528e2
Add a profile for ICC-2022.
wmaxey 6bff088
Drop the subversion specifics
wmaxey c9eac5d
Use the right compiler
miscco 67b1c48
Work around strange ICC compiler quircks
miscco dc5e51a
Disable `-ffast-math` for IntelLLVM compilers
miscco 8bc0e5e
Update environments/linux/docker/icc.base.Dockerfile
miscco fbea112
icc-2023->2022
wmaxey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Copyright (c) 2018-2020 NVIDIA Corporation | ||
miscco marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# Released under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
|
||
ARG ROOT_IMAGE | ||
|
||
FROM ${ROOT_IMAGE} AS devenv | ||
|
||
ARG COMPILERS="gcc clang" | ||
ARG ICC_TOOLKIT_VER="latest" | ||
ARG CMAKE_VER=3.23.1 | ||
ARG CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-Linux-x86_64.sh | ||
|
||
# `-y` answers yes to any interactive prompts. | ||
# `-qq` because apt is noisy | ||
ARG APT_GET="apt-get -y -qq" | ||
|
||
ENV TZ=US/Pacific | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
# apt-key complains about non-interactive usage. | ||
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 | ||
|
||
SHELL ["/usr/bin/env", "bash", "-c"] | ||
|
||
ADD ${CMAKE_URL} /tmp/cmake.sh | ||
|
||
# Install baseline development tools | ||
RUN function comment() { :; }; \ | ||
comment "Sources for gcc"; \ | ||
source /etc/os-release; \ | ||
${APT_GET} update; \ | ||
comment "Install basic build tools"; \ | ||
${APT_GET} --no-install-recommends install apt-utils curl wget git zip unzip tar \ | ||
sudo make software-properties-common ninja-build ccache pkg-config \ | ||
python3 python3-wheel python3-pip; \ | ||
comment "Install GCC and Clang"; \ | ||
# Unattended installation hack | ||
${APT_GET} install gcc g++ ${COMPILERS}; \ | ||
comment "Install CMake"; \ | ||
sh /tmp/cmake.sh --skip-license --prefix=/usr; \ | ||
comment "Install Python utils"; \ | ||
update-alternatives --quiet --install /usr/bin/python python $(which python3) 3; \ | ||
update-alternatives --quiet --set python $(which python3); \ | ||
wmaxey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
python3 -m pip install setuptools wheel; \ | ||
python3 -m pip install lit; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Snag Intel stuff | ||
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \ | ||
gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null; \ | ||
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \ | ||
sudo tee /etc/apt/sources.list.d/oneAPI.list; \ | ||
${APT_GET} update; ${APT_GET} install intel-dpcpp-cpp-compiler-${ICC_TOOLKIT_VER}; | ||
|
||
ENV PATH="$PATH:/opt/intel/oneapi/compiler/${ICC_TOOLKIT_VER}/linux/bin" | ||
|
||
# Assemble libcudacxx specific bits | ||
|
||
FROM devenv AS libcudacxx-configured | ||
|
||
# Default path according to CUDA Docker image, overridable if the image requires it | ||
ARG CUDACXX_PATH=/usr/local/cuda/bin/nvcc | ||
|
||
ARG HOST_CXX=gcc | ||
wmaxey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ARG CXX_DIALECT=11 | ||
|
||
# Attempt to load env from cccl/cuda | ||
ARG TEST_WITH_NVRTC=OFF | ||
|
||
# Docker on Windows can't follow symlinks??? | ||
ADD . /libcudacxx | ||
ADD ./include/cuda/std/detail/libcxx/include /libcudacxx/libcxx/include | ||
ADD ./.upstream-tests/test /libcudacxx/test | ||
ADD ./.upstream-tests/utils /libcudacxx/utils | ||
|
||
ENV CUDAFLAGS="-allow-unsupported-compiler" | ||
miscco marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
RUN cmake -S /libcudacxx -B /build \ | ||
-G Ninja \ | ||
-DLIBCUDACXX_ENABLE_STATIC_LIBRARY=OFF \ | ||
-DLIBCUDACXX_ENABLE_LIBCUDACXX_TESTS=ON \ | ||
-DLIBCUDACXX_ENABLE_LIBCXX_TESTS=OFF \ | ||
-DLIBCUDACXX_TEST_COMPILER_FLAGS="-allow-unsupported-compiler" \ | ||
-DLIBCUDACXX_TEST_WITH_NVRTC=${TEST_WITH_NVRTC} \ | ||
-DLIBCUDACXX_TEST_STANDARD_VER=c++${CXX_DIALECT} \ | ||
-DLIBCXX_ENABLE_FILESYSTEM=OFF \ | ||
-DCMAKE_CXX_COMPILER=${HOST_CXX} \ | ||
-DCMAKE_CUDA_COMPILER=${CUDACXX_PATH} \ | ||
-DCMAKE_CUDA_FLAGS="-allow-unsupported-compiler" | ||
|
||
RUN ninja -C /build libcudacxx_tu_tests && ninja -C /build clean | ||
# RUN ninja -C /build cxx | ||
|
||
ENV LIBCUDACXX_SITE_CONFIG=/build/test/lit.site.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -648,8 +648,8 @@ typedef __char32_t char32_t; | |
#define _LIBCUDACXX_HAS_VIRTUAL_DESTRUCTOR(...) __has_virtual_destructor(__VA_ARGS__) | ||
#endif | ||
|
||
#if __check_builtin(is_literal) | ||
#define _LIBCUDACXX_IS_LITERAL(...) __is_literal(__VA_ARGS__) | ||
#if __check_builtin(is_literal_type) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding |
||
#define _LIBCUDACXX_IS_LITERAL(...) __is_literal_type(__VA_ARGS__) | ||
#endif | ||
|
||
#if !defined(_LIBCUDACXX_HAS_NO_ASAN) && !__has_feature(address_sanitizer) | ||
|
@@ -682,6 +682,10 @@ typedef __char32_t char32_t; | |
#define _LIBCUDACXX_ADDRESSOF(...) __builtin_addressof(__VA_ARGS__) | ||
#endif | ||
|
||
#if __check_builtin(decay) | ||
#define _LIBCUDACXX_DECAY(...) __decay(__VA_ARGS__) | ||
#endif | ||
|
||
#if __check_builtin(is_array) | ||
#define _LIBCUDACXX_IS_ARRAY(...) __is_array(__VA_ARGS__) | ||
#endif | ||
|
@@ -2034,6 +2038,20 @@ extern "C" _LIBCUDACXX_FUNC_VIS void __sanitizer_annotate_contiguous_container( | |
# define _LIBCUDACXX_CPO_ACCESSIBILITY _LIBCUDACXX_INLINE_VAR | ||
#endif | ||
|
||
#if defined(__INTEL_LLVM_COMPILER) | ||
# define _LIBCUDACXX_USE_DECAY_FALLBACK | ||
# define _LIBCUDACXX_USE_MAKE_SIGNED_FALLBACK | ||
# define _LIBCUDACXX_USE_MAKE_UNSIGNED_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_ALL_EXTENTS_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_CONST_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_CV_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_CVREF_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_EXTENT_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_POINTER_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_VOLATILE_FALLBACK | ||
# define _LIBCUDACXX_USE_REMOVE_REFERENCE_T_FALLBACK | ||
#endif // __INTEL_LLVM_COMPILER | ||
|
||
#endif // __cplusplus | ||
|
||
#endif // _LIBCUDACXX_CONFIG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These options seem to be targeting nvcc (nvc++?) when icpx is the host compiler. Should this code be under
if (${CMAKE_CUDA_COMPILER_ID} STREQUAL "NVIDIA")
?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.
AFAIK this should be applied always because of our libcxx tests where we pretent to be a standard library
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 specifically disabled libcxx tests with this compiler. We can turn them on later, but I wanted our most important coverage to come first.