Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icpx to CI #292

Draft
wants to merge 1 commit into
base: 1.4
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
- name: build-ubuntu-icpc
CXX: icpc
INSTALL_ONEAPI: true
#- name: build-ubuntu-icpx
# CXX: icpx
# INSTALL_ONEAPI: true
- name: build-ubuntu-icpx
CXX: icpx
INSTALL_ONEAPI: true
steps:
- uses: actions/checkout@v2
with:
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ if(Vc_COMPILER_IS_INTEL)
# per default icc is not IEEE compliant, but we need that for verification
AddCompilerFlag("-fp-model source")
endif()
if(Vc_COMPILER_IS_INTEL_LLVM)
# per default icpx is not IEEE compliant, but we need that for verification
AddCompilerFlag("-fno-fast-math")
AddCompilerFlag("-fp-model=precise")
endif()

if(CMAKE_BUILD_TYPE STREQUAL "" AND NOT CMAKE_CXX_FLAGS MATCHES "-O[123]")
message(STATUS "WARNING! It seems you are compiling without optimization. Please set CMAKE_BUILD_TYPE.")
Expand Down
26 changes: 26 additions & 0 deletions cmake/VcMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ macro(vc_determine_compiler)
if(Vc_ICC_VERSION VERSION_LESS 18.0.0)
message(FATAL_ERROR "Vc 1.4 requires least ICC 18")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
set(Vc_COMPILER_IS_INTEL_LLVM true)
message(STATUS "Detected Compiler: IntelLLVM ${CMAKE_CXX_COMPILER_VERSION}")
elseif(CMAKE_CXX_COMPILER MATCHES "(opencc|openCC)$")
set(Vc_COMPILER_IS_OPEN64 true)
message(STATUS "Detected Compiler: Open64")
Expand Down Expand Up @@ -316,6 +319,29 @@ int main() { return 0; }
vc_add_compiler_flag(Vc_COMPILE_FLAGS "-diag-disable 2928")
endif()

# Intel doesn't implement the XOP or FMA4 intrinsics
set(Vc_XOP_INTRINSICS_BROKEN true)
set(Vc_FMA4_INTRINSICS_BROKEN true)
elseif(Vc_COMPILER_IS_INTEL_LLVM)
##################################################################################################
# Intel LLVM Compiler #
##################################################################################################

if(_add_buildtype_flags)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG -O3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DNDEBUG -O3")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(ENABLE_STRICT_ALIASING true CACHE BOOL "Enables strict aliasing rules for more aggressive optimizations")
if(ENABLE_STRICT_ALIASING)
AddCompilerFlag(-ansi-alias CXX_FLAGS Vc_COMPILE_FLAGS)
else()
AddCompilerFlag(-no-ansi-alias CXX_FLAGS Vc_COMPILE_FLAGS)
endif()
endif()

# Intel doesn't implement the XOP or FMA4 intrinsics
set(Vc_XOP_INTRINSICS_BROKEN true)
set(Vc_FMA4_INTRINSICS_BROKEN true)
Expand Down