Skip to content

Commit

Permalink
SYCL: fix '-flink-huge-device-code' compiler flag (#4332)
Browse files Browse the repository at this point in the history
The '-fsycl-link-huge-device-code' compiler flag is marked as deprecated
starting with the oneAPI 2023.2 release. It was removed with the 2025.0
release. The equivalent setting '-flink-huge-device-code' was added in
the 2023.2 release. Use the new setting with compiler versions greater
2023.1.
  • Loading branch information
stephan-rohr authored Feb 13, 2025
1 parent 159a069 commit 240e2a8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Tools/CMake/AMReXSYCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,15 @@ if (AMReX_SYCL_AOT)
endif ()

if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND "${CMAKE_BUILD_TYPE}" MATCHES "Debug")
target_link_options( SYCL
INTERFACE
"$<${_cxx_sycl}:-fsycl-link-huge-device-code>" )
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2023.2)
target_link_options( SYCL
INTERFACE
"$<${_cxx_sycl}:-fsycl-link-huge-device-code>" )
else ()
target_link_options( SYCL
INTERFACE
"$<${_cxx_sycl}:-flink-huge-device-code>" )
endif ()
endif ()

if (AMReX_PARALLEL_LINK_JOBS GREATER 1)
Expand Down

0 comments on commit 240e2a8

Please sign in to comment.