Skip to content

Commit

Permalink
Revert changes in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
s-Nick committed Sep 17, 2024
1 parent c9a7365 commit 86f0ee9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmake/FindCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ if(is_dpcpp)
# Check if the Nvidia target is supported. PortFFT uses this for choosing default configuration.
check_cxx_compiler_flag("-fsycl -fsycl-targets=nvptx64-nvidia-cuda" dpcpp_supports_nvptx64)

if(ONEAPI_ONEMKL_ENABLE_CURAND_BACKEND OR ONEAPI_ONEMKL_ENABLE_CUSOLVER_BACKEND)
if(ENABLE_CURAND_BACKEND OR ENABLE_CUSOLVER_BACKEND)
list(APPEND UNIX_INTERFACE_COMPILE_OPTIONS
-fsycl-targets=nvptx64-nvidia-cuda -fsycl-unnamed-lambda)
list(APPEND UNIX_INTERFACE_LINK_OPTIONS
-fsycl-targets=nvptx64-nvidia-cuda)
elseif(ONEAPI_ONEMKL_ENABLE_ROCBLAS_BACKEND OR ONEAPI_ONEMKL_ENABLE_ROCRAND_BACKEND
OR ONEAPI_ONEMKL_ENABLE_ROCSOLVER_BACKEND)
elseif(ENABLE_ROCBLAS_BACKEND OR ENABLE_ROCRAND_BACKEND
OR ENABLE_ROCSOLVER_BACKEND)
list(APPEND UNIX_INTERFACE_COMPILE_OPTIONS
-fsycl-targets=amdgcn-amd-amdhsa -fsycl-unnamed-lambda
-Xsycl-target-backend --offload-arch=${HIP_TARGETS})
list(APPEND UNIX_INTERFACE_LINK_OPTIONS
-fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend
--offload-arch=${HIP_TARGETS})
endif()
if(ONEAPI_ONEMKL_ENABLE_CURAND_BACKEND OR ONEAPI_ONEMKL_ENABLE_CUSOLVER_BACKEND
OR ONEAPI_ONEMKL_ENABLE_ROCBLAS_BACKEND
OR ONEAPI_ONEMKL_ENABLE_ROCRAND_BACKEND OR ONEAPI_ONEMKL_ENABLE_ROCSOLVER_BACKEND)
if(ENABLE_CURAND_BACKEND OR ENABLE_CUSOLVER_BACKEND
OR ENABLE_ROCBLAS_BACKEND
OR ENABLE_ROCRAND_BACKEND OR ENABLE_ROCSOLVER_BACKEND)
set_target_properties(ONEMKL::SYCL::SYCL PROPERTIES
INTERFACE_COMPILE_OPTIONS "${UNIX_INTERFACE_COMPILE_OPTIONS}"
INTERFACE_LINK_OPTIONS "${UNIX_INTERFACE_LINK_OPTIONS}"
Expand All @@ -70,8 +70,8 @@ if(is_dpcpp)
INTERFACE_LINK_LIBRARIES ${SYCL_LIBRARY})
endif()

if(ONEAPI_ONEMKL_ENABLE_ROCBLAS_BACKEND OR ONEAPI_ONEMKL_ENABLE_ROCRAND_BACKEND
OR ONEAPI_ONEMKL_ENABLE_ROCSOLVER_BACKEND)
if(ENABLE_ROCBLAS_BACKEND OR ENABLE_ROCRAND_BACKEND
OR ENABLE_ROCSOLVER_BACKEND)
# Allow find_package(HIP) to find the correct path to libclang_rt.builtins.a
# HIP's CMake uses the command `${HIP_CXX_COMPILER} -print-libgcc-file-name --rtlib=compiler-rt` to find this path.
# This can print a non-existing file if the compiler used is icpx.
Expand Down

0 comments on commit 86f0ee9

Please sign in to comment.