Skip to content

Commit a53f908

Browse files
committed
Narrow SYCL integration to minimal glue
1 parent a5dd578 commit a53f908

4 files changed

Lines changed: 10 additions & 20 deletions

File tree

.github/workflows/sycl-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
-DCMAKE_CXX_COMPILER=${ITLABAI_CXX}
7777
-DCMAKE_PREFIX_PATH=${ITLABAI_CMAKE_PREFIX_PATH}
7878
-DITLABAI_ENABLE_SYCL=ON
79-
-DITLABAI_SYCL_TARGETS=${ACPP_TARGETS}
79+
-DACPP_TARGETS=${ACPP_TARGETS}
8080
)
8181
if command -v ccache >/dev/null 2>&1; then
8282
cmake_args+=(
@@ -107,7 +107,7 @@ jobs:
107107
"-DCMAKE_CXX_COMPILER=$env:ITLABAI_CXX",
108108
"-DCMAKE_PREFIX_PATH=$env:ITLABAI_CMAKE_PREFIX_PATH",
109109
'-DITLABAI_ENABLE_SYCL=ON',
110-
"-DITLABAI_SYCL_TARGETS=$env:ACPP_TARGETS"
110+
"-DACPP_TARGETS=$env:ACPP_TARGETS"
111111
)
112112
if (Get-Command ccache -ErrorAction SilentlyContinue) {
113113
$cmakeArgs += '-DCMAKE_C_COMPILER_LAUNCHER=ccache'

CMakeLists.txt

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ project(ITLabAI)
44

55
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
66
option(ITLABAI_ENABLE_SYCL "Build SYCL example and helper targets" OFF)
7-
set(ITLABAI_SYCL_TARGETS "" CACHE STRING
8-
"Optional SYCL targets; forwarded to AdaptiveCpp as ACPP_TARGETS")
97

108
option(ENABLE_STATISTIC_TENSORS "Enable statistic tensors" OFF)
119

@@ -39,17 +37,6 @@ else()
3937
message(STATUS "OpenMP not found - parallel features disabled")
4038
endif()
4139

42-
if(ITLABAI_ENABLE_SYCL)
43-
if(ITLABAI_SYCL_TARGETS)
44-
set(ACPP_TARGETS "${ITLABAI_SYCL_TARGETS}" CACHE STRING
45-
"AdaptiveCpp targets" FORCE)
46-
endif()
47-
find_package(AdaptiveCpp CONFIG REQUIRED)
48-
function(itlabai_add_sycl_to_target)
49-
add_sycl_to_target(${ARGN})
50-
endfunction()
51-
endif()
52-
5340
include_directories("include")
5441

5542
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
@@ -97,4 +84,9 @@ endforeach()
9784
add_subdirectory(app)
9885
add_subdirectory(include)
9986
add_subdirectory(src)
87+
88+
if(ITLABAI_ENABLE_SYCL)
89+
add_subdirectory(app/SYCL)
90+
endif()
91+
10092
add_subdirectory(test)

app/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@ add_subdirectory(ReaderImage)
22
add_subdirectory(Accuracy)
33
add_subdirectory(Converters)
44
add_subdirectory(Graph)
5-
6-
if(ITLABAI_ENABLE_SYCL)
7-
add_subdirectory(SYCL)
8-
endif()

app/SYCL/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
find_package(AdaptiveCpp CONFIG REQUIRED)
2+
13
add_executable(SYCL_Example
24
sycl_example.cpp
35
)
46
target_link_libraries(SYCL_Example PRIVATE layers_lib AdaptiveCpp::acpp-rt)
57

68
add_library(SYCL_Example_kernel OBJECT sycl_kernel.cpp)
7-
itlabai_add_sycl_to_target(TARGET SYCL_Example_kernel SOURCES
9+
add_sycl_to_target(TARGET SYCL_Example_kernel SOURCES
810
sycl_kernel.cpp
911
)
1012
target_sources(SYCL_Example PRIVATE $<TARGET_OBJECTS:SYCL_Example_kernel>)

0 commit comments

Comments
 (0)