Skip to content

Commit fca2f14

Browse files
ENH: removing DPCTL dep from building (#1685)
* ENH: updates for onedal.common module --------- Co-authored-by: Nikita Kulikov <[email protected]> * removed unused files * update onedal/dal.cpp * ENH: removing DPCTL dep from building * fix onedal test pytest fixture retruns empty list, not None. Will be fixed for all test suits seperately * Update onedal/common/_policy.py * minor update * disabled tests for outdated functionality * removed DPCTL include usage from CMakelist
1 parent e9deb95 commit fca2f14

File tree

3 files changed

+14
-37
lines changed

3 files changed

+14
-37
lines changed

onedal/datatypes/tests/test_data.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ def test_input_format_f_contiguous_pandas(queue, dtype):
144144
_test_input_format_f_contiguous_pandas(queue, dtype)
145145

146146

147+
# TODO:
148+
# Currently `dpctl_to_table` is not used in onedal estimators.
149+
# The test will be enabled after future data management update, that brings
150+
# re-impl of conversions between onedal tables and usm ndarrays.
151+
@pytest.mark.skip(
152+
reason="Currently removed. Will be enabled after data management update"
153+
)
147154
@pytest.mark.skipif(not dpctl_available, reason="requires dpctl>=0.14")
148155
@pytest.mark.parametrize("queue", get_queues("cpu,gpu"))
149156
@pytest.mark.parametrize("dtype", [np.float32, np.float64, np.int32, np.int64])
@@ -171,6 +178,13 @@ def test_input_format_c_contiguous_dpctl(queue, dtype):
171178
assert x_dpt_from_table.flags.c_contiguous
172179

173180

181+
# TODO:
182+
# Currently `dpctl_to_table` is not used in onedal estimators.
183+
# The test will be enabled after future data management update, that brings
184+
# re-impl of conversions between onedal tables and usm ndarrays.
185+
@pytest.mark.skip(
186+
reason="Currently removed. Will be enabled after data management update"
187+
)
174188
@pytest.mark.skipif(not dpctl_available, reason="requires dpctl>=0.14")
175189
@pytest.mark.parametrize("queue", get_queues("cpu,gpu"))
176190
@pytest.mark.parametrize("dtype", [np.float32, np.float64, np.int32, np.int64])

scripts/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ message(STATUS "PYTHON_INCLUDE_DIR:" ${PYTHON_INCLUDE_DIR})
6363
message(STATUS "PYTHON_LIBRARY_DIR:" ${PYTHON_LIBRARY_DIR})
6464
message(STATUS "NUMPY_INCLUDE_DIRS:" ${NUMPY_INCLUDE_DIRS})
6565

66-
if(ONEDAL_DPCTL_INTEGRATION)
67-
message(STATUS "DPCTL_INCLUDE_DIR:" ${DPCTL_INCLUDE_DIR})
68-
endif()
69-
7066
if(IFACE STREQUAL "dpc")
7167
set(IFACE_IS_DPC ON)
7268
else()
@@ -170,11 +166,6 @@ elseif(IFACE_IS_DPC OR IFACE_IS_SPMD_DPC)
170166
"ONEDAL_DATA_PARALLEL"
171167
"NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION")
172168

173-
if(ONEDAL_DPCTL_INTEGRATION)
174-
list(APPEND COMPILE_DEFINITIONS
175-
"ONEDAL_DPCTL_INTEGRATION")
176-
endif()
177-
178169
if(IFACE_IS_SPMD_DPC)
179170
list(APPEND COMPILE_DEFINITIONS
180171
"ONEDAL_DATA_PARALLEL_SPMD")
@@ -203,10 +194,6 @@ endif()
203194
set(EXTERNAL_LINK_DIRECTORIES ${PYTHON_LIBRARY_DIR} ${oneDAL_LIBRARY_DIR})
204195
set(EXTERNAL_LINK_LIBRARIES ${ONEDAL_LIBRARIES})
205196

206-
if(ONEDAL_DPCTL_INTEGRATION)
207-
list(APPEND EXTERNAL_INCLUDE_DIRECTORIES ${DPCTL_INCLUDE_DIR})
208-
endif()
209-
210197
if(IFACE_IS_SPMD_DPC)
211198
list(APPEND EXTERNAL_LINK_LIBRARIES ${MPI_LIBRARY})
212199
list(APPEND EXTERNAL_LINK_DIRECTORIES ${MPI_LIBRARY_DIR})

scripts/build_backend.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,6 @@ def custom_build_cmake_clib(
124124
):
125125
import pybind11
126126

127-
try:
128-
import dpctl
129-
130-
dpctl_available = dpctl.__version__ >= "0.14"
131-
dpctl_include = dpctl.get_include()
132-
except ImportError:
133-
import importlib.util
134-
135-
try:
136-
dpctl_include = os.path.join(
137-
importlib.util.find_spec("dpctl").submodule_search_locations[0], "include"
138-
)
139-
dpctl_available = dpctl_include is not None
140-
except AttributeError:
141-
dpctl_available = False
142-
143-
log.info(f"Is DPCTL available: {str(dpctl_available)}")
144-
145127
root_dir = os.path.normpath(jp(os.path.dirname(__file__), ".."))
146128
log.info(f"Project directory is: {root_dir}")
147129

@@ -207,12 +189,6 @@ def custom_build_cmake_clib(
207189
"-DoneDAL_USE_PARAMETERS_LIB=" + use_parameters_arg,
208190
]
209191

210-
if dpctl_available:
211-
cmake_args += [
212-
"-DDPCTL_INCLUDE_DIR=" + dpctl_include,
213-
"-DONEDAL_DPCTL_INTEGRATION:BOOL=ON",
214-
]
215-
216192
if build_distribute:
217193
cmake_args += [
218194
"-DMPI_INCLUDE_DIRS=" + MPI_INCDIRS,

0 commit comments

Comments
 (0)