diff --git a/CHANGELOG.md b/CHANGELOG.md index ea3935b3..abb2ecad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed +- Changed minimal C++ standard to C++-17 + ## [1.11.0] - 2022-02-08 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c41b365..dbad75cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ if (POLICY CMP0074) endif () project(marian CXX C) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(BUILD_ARCH native CACHE STRING "Compile for this CPU architecture.") @@ -91,10 +91,11 @@ if(MSVC) # C4310: cast truncates constant value # C4324: 'marian::cpu::int16::`anonymous-namespace'::ScatterPut': structure was padded due to alignment specifier # C4702: unreachable code; note it is also disabled globally in the VS project file + # C4996: warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17 if(USE_SENTENCEPIECE) - set(DISABLE_GLOBALLY "/wd\"4310\" /wd\"4324\" /wd\"4702\" /wd\"4100\"") + set(DISABLE_GLOBALLY "/wd\"4310\" /wd\"4324\" /wd\"4702\" /wd\"4996\" /wd\"4100\"") else() - set(DISABLE_GLOBALLY "/wd\"4310\" /wd\"4324\" /wd\"4702\"") + set(DISABLE_GLOBALLY "/wd\"4310\" /wd\"4324\" /wd\"4702\" /wd\"4996\"") endif() # set(INTRINSICS "/arch:AVX") diff --git a/VERSION b/VERSION index cd74ac3b..65b4811d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.11.0 +v1.11.1 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0348ebb4..f5e92400 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -192,6 +192,9 @@ stages: displayName: Ubuntu timeoutInMinutes: 90 + # Minimal tested configurations for marian-dev v1.11 and C++17: + # * Ubuntu 16.04, GCC 7.5, CMake 3.10.2, CUDA 9.2 (probably GCC 6 would work too) + # * Ubuntu 18.04, GCC 7.5, CMake 3.12.2, CUDA 10.0 strategy: matrix: ################################################################ @@ -319,51 +322,6 @@ stages: displayName: Print versions workingDirectory: build - ###################################################################### - - job: BuildUbuntuMinimal - condition: eq(${{ parameters.runBuilds }}, true) - displayName: Ubuntu CPU+GPU gcc-7 cmake 3.5 - - pool: - vmImage: ubuntu-18.04 - - steps: - - checkout: self - submodules: true - - # The script simplifies installation of different versions of CUDA. - - bash: ./scripts/ci/install_cuda_ubuntu.sh "10.0" - displayName: Install CUDA - - # CMake 3.5.1 is the minimum version supported - - bash: | - wget -nv https://cmake.org/files/v3.5/cmake-3.5.1-Linux-x86_64.tar.gz - tar zxf cmake-3.5.1-Linux-x86_64.tar.gz - ./cmake-3.5.1-Linux-x86_64/bin/cmake --version - displayName: Download CMake - - # GCC 5 is the minimum version supported - - bash: | - /usr/bin/gcc-7 --version - mkdir -p build - cd build - CC=/usr/bin/gcc-7 CXX=/usr/bin/g++-7 CUDAHOSTCXX=/usr/bin/g++-7 \ - ../cmake-3.5.1-Linux-x86_64/bin/cmake .. \ - -DCOMPILE_CPU=on \ - -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.0 - displayName: Configure CMake - - - bash: make -j3 - displayName: Compile - workingDirectory: build - - - bash: | - ./marian --version - ./marian-decoder --version - ./marian-scorer --version - displayName: Print versions - workingDirectory: build - ###################################################################### - job: BuildMacOS condition: eq(${{ parameters.runBuilds }}, true) diff --git a/scripts/ci/install_cuda_ubuntu.sh b/scripts/ci/install_cuda_ubuntu.sh index b058294a..de60a5b6 100755 --- a/scripts/ci/install_cuda_ubuntu.sh +++ b/scripts/ci/install_cuda_ubuntu.sh @@ -60,6 +60,13 @@ CUDA_PACKAGES_IN=( CUDA_PACKAGES="" for package in "${CUDA_PACKAGES_IN[@]}"; do + # @todo This is not perfect. Should probably provide a separate list for diff versions + # cuda-compiler-X-Y if CUDA >= 9.1 else cuda-nvcc-X-Y + if [[ "${package}" == "nvcc" ]] && version_ge "$CUDA_VERSION_MAJOR_MINOR" "9.1" ; then + package="compiler" + elif [[ "${package}" == "compiler" ]] && version_lt "$CUDA_VERSION_MAJOR_MINOR" "9.1" ; then + package="nvcc" + fi # Build the full package name and append to the string. CUDA_PACKAGES+=" cuda-${package}-${CUDA_MAJOR}-${CUDA_MINOR}" done @@ -72,8 +79,8 @@ echo "CUDA_PACKAGES ${CUDA_PACKAGES}" PIN_FILENAME="cuda-ubuntu${UBUNTU_VERSION}.pin" PIN_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/${PIN_FILENAME}" -APT_KEY_URL="http://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/7fa2af80.pub" -REPO_URL="http://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/" +APT_KEY_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/7fa2af80.pub" +REPO_URL="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UBUNTU_VERSION}/x86_64/" echo "PIN_FILENAME ${PIN_FILENAME}" echo "PIN_URL ${PIN_URL}" diff --git a/src/3rd_party/half_float/umHalf.inl b/src/3rd_party/half_float/umHalf.inl index 3f5285a2..257ba1c2 100644 --- a/src/3rd_party/half_float/umHalf.inl +++ b/src/3rd_party/half_float/umHalf.inl @@ -344,7 +344,7 @@ inline HalfFloat operator+ (HalfFloat one, HalfFloat two) // compute the difference between the two exponents. shifts with negative // numbers are undefined, thus we need two code paths - register int expDiff = one.IEEE.Exp - two.IEEE.Exp; + /*register*/ int expDiff = one.IEEE.Exp - two.IEEE.Exp; if (0 == expDiff) {