Skip to content

Commit 3d73d2c

Browse files
Dmitry Razdoburdinrazdoburdin
authored andcommitted
rename oneapi->sycl; remove backend; add tests for multiclass obj
1 parent 7e79900 commit 3d73d2c

35 files changed

+266
-5694
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ option(PLUGIN_DENSE_PARSER "Build dense parser plugin" OFF)
8686
option(PLUGIN_RMM "Build with RAPIDS Memory Manager (RMM)" OFF)
8787
option(PLUGIN_FEDERATED "Build with Federated Learning" OFF)
8888
## TODO: 1. Add check if DPC++ compiler is used for building
89-
option(PLUGIN_UPDATER_ONEAPI "DPC++ updater" OFF)
89+
option(PLUGIN_SYCL "SYCL plugin" OFF)
9090
option(ADD_PKGCONFIG "Add xgboost.pc into system." ON)
9191

9292
#-- Checks for building XGBoost
@@ -264,14 +264,14 @@ if (PLUGIN_RMM)
264264
get_target_property(rmm_link_libs rmm::rmm INTERFACE_LINK_LIBRARIES)
265265
endif (PLUGIN_RMM)
266266

267-
if (PLUGIN_UPDATER_ONEAPI)
267+
if (PLUGIN_SYCL)
268268
set(CMAKE_CXX_LINK_EXECUTABLE
269269
"icpx <FLAGS> <CMAKE_CXX_LINK_FLAGS> -qopenmp <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
270270
set(CMAKE_CXX_CREATE_SHARED_LIBRARY
271271
"icpx <CMAKE_SHARED_LIBRARY_CXX_FLAGS> -qopenmp <LANGUAGE_COMPILE_FLAGS> \
272272
<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG>,<TARGET_SONAME> \
273273
-o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
274-
endif (PLUGIN_UPDATER_ONEAPI)
274+
endif (PLUGIN_SYCL)
275275

276276
#-- library
277277
if (BUILD_STATIC_LIB)

plugin/CMakeLists.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@ if (PLUGIN_DENSE_PARSER)
22
target_sources(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/plugin/dense_parser/dense_libsvm.cc)
33
endif (PLUGIN_DENSE_PARSER)
44

5-
if (PLUGIN_UPDATER_ONEAPI)
5+
if (PLUGIN_SYCL)
66
set(CMAKE_CXX_COMPILER "icpx")
7-
add_library(oneapi_plugin OBJECT
8-
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/hist_util_oneapi.cc
9-
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/regression_obj_oneapi.cc
10-
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/multiclass_obj_oneapi.cc
11-
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/updater_quantile_hist_oneapi.cc
12-
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/device_manager_oneapi.cc
13-
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/predictor_oneapi.cc)
14-
target_include_directories(oneapi_plugin
7+
add_library(plugin_sycl OBJECT
8+
${xgboost_SOURCE_DIR}/plugin/sycl/common/hist_util.cc
9+
${xgboost_SOURCE_DIR}/plugin/sycl/objective/regression_obj.cc
10+
${xgboost_SOURCE_DIR}/plugin/sycl/objective/multiclass_obj.cc
11+
${xgboost_SOURCE_DIR}/plugin/sycl/tree/updater_quantile_hist.cc
12+
${xgboost_SOURCE_DIR}/plugin/sycl/device_manager.cc
13+
${xgboost_SOURCE_DIR}/plugin/sycl/predictor/predictor.cc)
14+
target_include_directories(plugin_sycl
1515
PRIVATE
1616
${xgboost_SOURCE_DIR}/include
1717
${xgboost_SOURCE_DIR}/dmlc-core/include
1818
${xgboost_SOURCE_DIR}/rabit/include)
19-
target_compile_definitions(oneapi_plugin PUBLIC -DXGBOOST_USE_ONEAPI=1)
20-
target_link_libraries(oneapi_plugin PUBLIC -fsycl)
21-
set_target_properties(oneapi_plugin PROPERTIES
19+
target_compile_definitions(plugin_sycl PUBLIC -DXGBOOST_USE_SYCL=1)
20+
target_link_libraries(plugin_sycl PUBLIC -fsycl)
21+
set_target_properties(plugin_sycl PROPERTIES
2222
COMPILE_FLAGS -fsycl
2323
CXX_STANDARD 17
2424
CXX_STANDARD_REQUIRED ON
2525
POSITION_INDEPENDENT_CODE ON)
2626
if (USE_OPENMP)
2727
find_package(OpenMP REQUIRED)
28-
set_target_properties(oneapi_plugin PROPERTIES
28+
set_target_properties(plugin_sycl PROPERTIES
2929
COMPILE_FLAGS "-fsycl -qopenmp")
3030
endif (USE_OPENMP)
31-
# Get compilation and link flags of oneapi_plugin and propagate to objxgboost
32-
target_link_libraries(objxgboost PUBLIC oneapi_plugin)
33-
# Add all objects of oneapi_plugin to objxgboost
34-
target_sources(objxgboost INTERFACE $<TARGET_OBJECTS:oneapi_plugin>)
35-
endif (PLUGIN_UPDATER_ONEAPI)
31+
# Get compilation and link flags of plugin_sycl and propagate to objxgboost
32+
target_link_libraries(objxgboost PUBLIC plugin_sycl)
33+
# Add all objects of plugin_sycl to objxgboost
34+
target_sources(objxgboost INTERFACE $<TARGET_OBJECTS:plugin_sycl>)
35+
endif (PLUGIN_SYCL)
3636

3737
# Add the Federate Learning plugin if enabled.
3838
if (PLUGIN_FEDERATED)

plugin/updater_oneapi/README.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

plugin/updater_oneapi/data_oneapi.h

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)