Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
egrabovskaya committed Jul 15, 2024
1 parent ff92b25 commit 8a11860
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ cmake_minimum_required (VERSION 3.13)
# Define build type
set(DEFAULT_BUILD_TYPE "Release")

message("==> CMakeLists.txt")

if("${CMAKE_BUILD_TYPE}" STREQUAL "")
message(STATUS "CMAKE_BUILD_TYPE: None, set to ${DEFAULT_BUILD_TYPE} by default")
set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE} CACHE STRING
Expand Down
4 changes: 3 additions & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
# SPDX-License-Identifier: Apache-2.0
#===============================================================================

message("1. cmake/CMakeLists.txt")

install(FILES FindCompiler.cmake
DESTINATION "lib/cmake/${PROJECT_NAME}"
)

message("2. cmake/CMakeLists.txt")
if(ENABLE_MKLGPU_BACKEND OR ENABLE_MKLCPU_BACKEND)
install(FILES mkl/MKLConfig.cmake
DESTINATION "lib/cmake/${PROJECT_NAME}"
Expand Down
6 changes: 4 additions & 2 deletions cmake/FindCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
# SPDX-License-Identifier: Apache-2.0
#===============================================================================

message("1. FindCompiler.cmake")
include_guard()

message("2. FindCompiler.cmake")
include(CheckCXXCompilerFlag)
include(FindPackageHandleStandardArgs)

message("3. FindCompiler.cmake")
check_cxx_compiler_flag("-fsycl" is_dpcpp)
message("is_dpcpp = ${is_dpcpp}")

if(is_dpcpp)
# Workaround for internal compiler error during linking if -fsycl is used
Expand Down
1 change: 1 addition & 0 deletions examples/rng/device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ foreach(rng_device_source ${RNG_DEVICE_SOURCES})
)

if(is_dpcpp)
message("is_dpcpp in examples/rng/device")
target_link_options(example_${domain}_${rng_device_source} PUBLIC -fsycl -fsycl-device-code-split=per_kernel)
endif()

Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/rng/device/moments/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ else()
endif()

if(is_dpcpp)
message("is_dpcpp in unit_tests/moments")
target_link_options(rng_device_moments_ct PUBLIC -fsycl -fsycl-device-code-split=per_kernel)
endif()
1 change: 1 addition & 0 deletions tests/unit_tests/rng/device/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ else()
endif()

if(is_dpcpp)
message("is_dpcpp in unit_tests/service")
target_link_options(rng_device_service_ct PUBLIC -fsycl -fsycl-device-code-split=per_kernel)
endif()

0 comments on commit 8a11860

Please sign in to comment.