mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add NVHPC (nvc++) compiler support and CI build/test jobs
libeigen/eigen!2186 Closes #3032 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -278,10 +278,10 @@
|
|||||||
|
|
||||||
/// \internal EIGEN_COMP_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC,
|
/// \internal EIGEN_COMP_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC,
|
||||||
/// clang, mingw, etc.)
|
/// clang, mingw, etc.)
|
||||||
#if EIGEN_COMP_GNUC && \
|
#if EIGEN_COMP_GNUC && \
|
||||||
!(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_CLANGICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || \
|
!(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_CLANGICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || \
|
||||||
EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN || EIGEN_COMP_FCC || EIGEN_COMP_CLANGFCC || \
|
EIGEN_COMP_NVHPC || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN || EIGEN_COMP_FCC || \
|
||||||
EIGEN_COMP_CPE || EIGEN_COMP_CLANGCPE || EIGEN_COMP_LCC)
|
EIGEN_COMP_CLANGFCC || EIGEN_COMP_CPE || EIGEN_COMP_CLANGCPE || EIGEN_COMP_LCC)
|
||||||
#define EIGEN_COMP_GNUC_STRICT 1
|
#define EIGEN_COMP_GNUC_STRICT 1
|
||||||
#else
|
#else
|
||||||
#define EIGEN_COMP_GNUC_STRICT 0
|
#define EIGEN_COMP_GNUC_STRICT 0
|
||||||
|
|||||||
@@ -34,7 +34,9 @@
|
|||||||
|
|
||||||
/* --- To print date and time of compilation of current source on stdout --- */
|
/* --- To print date and time of compilation of current source on stdout --- */
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__NVCOMPILER)
|
||||||
|
#define COMPILER "nvc++";
|
||||||
|
#elif defined(__GNUC__)
|
||||||
#define COMPILER "g++";
|
#define COMPILER "g++";
|
||||||
#elif defined(__sun)
|
#elif defined(__sun)
|
||||||
#define COMPILER "CC";
|
#define COMPILER "CC";
|
||||||
|
|||||||
@@ -140,6 +140,20 @@ build:linux:docs:
|
|||||||
# -DEIGEN_TEST_CUSTOM_CXX_FLAGS=-fsanitize=memory
|
# -DEIGEN_TEST_CUSTOM_CXX_FLAGS=-fsanitize=memory
|
||||||
# -DEIGEN_TEST_CUSTOM_LINKER_FLAGS=-fsanitize=memory
|
# -DEIGEN_TEST_CUSTOM_LINKER_FLAGS=-fsanitize=memory
|
||||||
|
|
||||||
|
######## NVHPC #################################################################
|
||||||
|
|
||||||
|
# NVHPC (nvc++) uses NVIDIA's HPC SDK container image with the compilers
|
||||||
|
# pre-installed. We override EIGEN_CI_INSTALL to avoid trying to apt-get
|
||||||
|
# install the compiler.
|
||||||
|
build:linux:x86-64:nvhpc-25.1:default:
|
||||||
|
extends: .build:linux:cross:x86-64
|
||||||
|
image: nvcr.io/nvidia/nvhpc:25.1-devel-cuda12.6-ubuntu22.04
|
||||||
|
variables:
|
||||||
|
EIGEN_CI_C_COMPILER: nvc
|
||||||
|
EIGEN_CI_CXX_COMPILER: nvc++
|
||||||
|
EIGEN_CI_INSTALL: ""
|
||||||
|
EIGEN_CI_CROSS_INSTALL: ""
|
||||||
|
|
||||||
######## CUDA ##################################################################
|
######## CUDA ##################################################################
|
||||||
|
|
||||||
.build:linux:cuda:
|
.build:linux:cuda:
|
||||||
@@ -312,3 +326,4 @@ build:linux:cross:x86-64:clang-12:default:smoketest:
|
|||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
tags:
|
tags:
|
||||||
- saas-linux-medium-amd64
|
- saas-linux-medium-amd64
|
||||||
|
|
||||||
|
|||||||
@@ -220,6 +220,25 @@ test:linux:x86-64:clang-19:generic:avx512dq:unsupported:
|
|||||||
variables:
|
variables:
|
||||||
EIGEN_CI_CTEST_LABEL: Unsupported
|
EIGEN_CI_CTEST_LABEL: Unsupported
|
||||||
|
|
||||||
|
##### NVHPC ####################################################################
|
||||||
|
|
||||||
|
.test:linux:x86-64:nvhpc-25.1:default:
|
||||||
|
extends: .test:linux:x86-64
|
||||||
|
image: nvcr.io/nvidia/nvhpc:25.1-devel-cuda12.6-ubuntu22.04
|
||||||
|
needs: [ build:linux:x86-64:nvhpc-25.1:default ]
|
||||||
|
variables:
|
||||||
|
EIGEN_CI_INSTALL: ""
|
||||||
|
|
||||||
|
test:linux:x86-64:nvhpc-25.1:default:official:
|
||||||
|
extends: .test:linux:x86-64:nvhpc-25.1:default
|
||||||
|
variables:
|
||||||
|
EIGEN_CI_CTEST_LABEL: Official
|
||||||
|
|
||||||
|
test:linux:x86-64:nvhpc-25.1:default:unsupported:
|
||||||
|
extends: .test:linux:x86-64:nvhpc-25.1:default
|
||||||
|
variables:
|
||||||
|
EIGEN_CI_CTEST_LABEL: Unsupported
|
||||||
|
|
||||||
##### CUDA #####################################################################
|
##### CUDA #####################################################################
|
||||||
.test:linux:cuda:
|
.test:linux:cuda:
|
||||||
extends: .test:linux
|
extends: .test:linux
|
||||||
@@ -420,3 +439,4 @@ test:linux:x86-64:clang-12:default:smoketest:
|
|||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
tags:
|
tags:
|
||||||
- saas-linux-medium-amd64
|
- saas-linux-medium-amd64
|
||||||
|
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ macro(ei_get_compilerver VAR)
|
|||||||
endif()
|
endif()
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(${VAR} "${CMAKE_CXX_COMPILER_VERSION}")
|
set(${VAR} "${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "PGI")
|
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "PGI" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "NVHPC")
|
||||||
set(${VAR} "${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}")
|
set(${VAR} "${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
else()
|
else()
|
||||||
# on all other system we rely on ${CMAKE_CXX_COMPILER}
|
# on all other system we rely on ${CMAKE_CXX_COMPILER}
|
||||||
|
|||||||
Reference in New Issue
Block a user