diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index bbfba61e14..5d860e1076 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -57,7 +57,7 @@ jobs: - name: Install dpctl dependencies run: | - pip install numpy cython setuptools"<80" scikit-build"<1.0" cmake ninja versioneer[toml]==0.29 + pip install cython setuptools"<80" scikit-build"<1.0" cmake ninja versioneer[toml]==0.29 - name: Report compiler version run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index f69d1459d9..91a5d08423 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * The event returned by `dpctl.SyclQueue.keep_args_alive`, `dpctl::utils::keep_args_alive` and `dpctl.SyclQueue._submit_keep_args_alive` is now for an empty kernel that gates the deferred release rather than for a `host_task` that performs it, so its completion means that the objects are no longer in use rather than that they have been released [gh-2359](https://github.com/IntelPython/dpctl/pull/2359) * `dpctl.utils.SequentialOrderManager[q].submitted_events` includes the queue's last event for in-order queues when `sycl_ext_oneapi_in_order_queue_events` is available, and `wait()` waits for all work on an in-order queue [gh-2299](https://github.com/IntelPython/dpctl/pull/2299) * Pickled `dpctl.memory.MemoryUSMShared`, `MemoryUSMDevice`, and `MemoryUSMHost` objects keep their queue instead of being restored on the default device. Pickling memory whose queue can not be pickled raises `pickle.PicklingError` [gh-2406](https://github.com/IntelPython/dpctl/pull/2406) +* NumPy is no longer a build dependency of `dpctl`, only a run-time dependency [gh-2436](https://github.com/IntelPython/dpctl/pull/2436) ### Deprecated * Deprecated `dpctl.SyclQueue._submit_keep_args_alive` in favor of `dpctl.SyclQueue.keep_args_alive`, which it now calls and which behaves identically [gh-2359](https://github.com/IntelPython/dpctl/pull/2359) diff --git a/conda-recipe/conda_build_config.yaml b/conda-recipe/conda_build_config.yaml index c1ff6fabaf..2a59da40d5 100644 --- a/conda-recipe/conda_build_config.yaml +++ b/conda-recipe/conda_build_config.yaml @@ -7,8 +7,6 @@ python: - "3.14.* *_cp314t" - "3.15.* *_cp315" - "3.15.* *_cp315t" -numpy: - - '2' c_compiler: # [linux] - gcc # [linux] cxx_compiler: # [linux] diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 0a4459221f..77baead8ab 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -39,14 +39,13 @@ requirements: - scikit-build >=0.17.0,<1.0 - cython >=3.1.0 # [py>=313] - cython >=3.0.10 # [py<313] - - numpy # WARNING: check with doc how to upgrade - versioneer ==0.29 run: - python - {{ pin_compatible('intel-sycl-rt', min_pin='x.x', max_pin='x') }} - {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }} - - numpy + - numpy >=2.0.0 test: requires: diff --git a/docs/doc_sources/contributor_guides/building.rst b/docs/doc_sources/contributor_guides/building.rst index 2a184c6bf6..0bfb57c0d3 100644 --- a/docs/doc_sources/contributor_guides/building.rst +++ b/docs/doc_sources/contributor_guides/building.rst @@ -89,11 +89,11 @@ Build and Install with scikit-build To build using Python ``setuptools`` and ``scikit-build``, install the following Python packages: - ``cython`` -- ``numpy`` - ``cmake`` - ``scikit-build`` - ``ninja`` - ``versioneer`` +- ``numpy`` (runtime dependency) - ``gtest`` (optional to run C API tests) - ``gmock`` (optional to run C API tests) - ``pytest`` (optional to run Python API tests) diff --git a/dpctl/CMakeLists.txt b/dpctl/CMakeLists.txt index 4ba314f5b4..f095742514 100644 --- a/dpctl/CMakeLists.txt +++ b/dpctl/CMakeLists.txt @@ -1,5 +1,3 @@ -find_package(Python REQUIRED COMPONENTS NumPy) - # -t is to only Cythonize sources with timestamps newer than existing CXX files (if present) # -w is to set working directory (and correctly set __pyx_f[] array of filenames) set(CYTHON_FLAGS "-t -w \"${CMAKE_SOURCE_DIR}\"") @@ -138,7 +136,6 @@ function(build_dpctl_ext _trgt _src _dest) ) endif() endif() - target_link_libraries(${_trgt} PRIVATE Python::NumPy) if (DPCTL_GENERATE_COVERAGE) target_compile_definitions(${_trgt} PRIVATE CYTHON_TRACE=1 CYTHON_TRACE_NOGIL=1) if (BUILD_DPCTL_EXT_SYCL) diff --git a/examples/cython/sycl_buffer/CMakeLists.txt b/examples/cython/sycl_buffer/CMakeLists.txt index fe06e30da9..cb3354ed41 100644 --- a/examples/cython/sycl_buffer/CMakeLists.txt +++ b/examples/cython/sycl_buffer/CMakeLists.txt @@ -22,7 +22,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) # Define CMAKE_INSTALL_xxx: LIBDIR, INCLUDEDIR include(GNUInstallDirs) -find_package(Python REQUIRED COMPONENTS Development.Module NumPy) +find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) find_package(Dpctl REQUIRED) # -w is to set working directory (and correctly set __pyx_f[] array of filenames) @@ -36,7 +36,6 @@ add_cython_target(${py_module_name} ${_cy_source} CXX OUTPUT_VAR _generated_cy_s Python_add_library(${py_module_name} MODULE WITH_SOABI ${_generated_cy_src}) add_sycl_to_target(TARGET ${py_module_name} SOURCES ${_generated_cy_src}) target_include_directories(${py_module_name} PUBLIC src ${Dpctl_INCLUDE_DIRS}) -target_link_libraries(${py_module_name} PRIVATE Python::NumPy) install(TARGETS ${py_module_name} DESTINATION syclbuffer) diff --git a/examples/cython/use_dpctl_sycl/CMakeLists.txt b/examples/cython/use_dpctl_sycl/CMakeLists.txt index 2b489802d9..b085f3d60c 100644 --- a/examples/cython/use_dpctl_sycl/CMakeLists.txt +++ b/examples/cython/use_dpctl_sycl/CMakeLists.txt @@ -22,7 +22,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) # Define CMAKE_INSTALL_xxx: LIBDIR, INCLUDEDIR include(GNUInstallDirs) -find_package(Python REQUIRED COMPONENTS Development.Module NumPy) +find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) find_package(Dpctl REQUIRED) # -w is to set working directory (and correctly set __pyx_f[] array of filenames) @@ -36,7 +36,6 @@ add_cython_target(${py_module_name} ${_cy_source} CXX OUTPUT_VAR _generated_cy_s Python_add_library(${py_module_name} MODULE WITH_SOABI ${_generated_cy_src}) add_sycl_to_target(TARGET ${py_module_name} SOURCES ${_generated_cy_src}) target_include_directories(${py_module_name} PUBLIC include ${Dpctl_INCLUDE_DIRS}) -target_link_libraries(${py_module_name} PRIVATE Python::NumPy) install(TARGETS ${py_module_name} DESTINATION use_dpctl_sycl) diff --git a/examples/pybind11/external_usm_allocation/CMakeLists.txt b/examples/pybind11/external_usm_allocation/CMakeLists.txt index da57f8c966..17c0e75b13 100644 --- a/examples/pybind11/external_usm_allocation/CMakeLists.txt +++ b/examples/pybind11/external_usm_allocation/CMakeLists.txt @@ -27,7 +27,7 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(pybind11) -find_package(Python REQUIRED COMPONENTS Development.Module NumPy) +find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) find_package(Dpctl REQUIRED) set(py_module_name _external_usm_alloc) diff --git a/examples/pybind11/onemkl_gemv/CMakeLists.txt b/examples/pybind11/onemkl_gemv/CMakeLists.txt index 5a41b021b2..2fc8161a64 100644 --- a/examples/pybind11/onemkl_gemv/CMakeLists.txt +++ b/examples/pybind11/onemkl_gemv/CMakeLists.txt @@ -24,7 +24,7 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(pybind11) -find_package(Python REQUIRED COMPONENTS Development.Module NumPy) +find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) find_package(Dpctl REQUIRED) find_package(TBB REQUIRED) diff --git a/examples/pybind11/use_dpctl_sycl_kernel/CMakeLists.txt b/examples/pybind11/use_dpctl_sycl_kernel/CMakeLists.txt index 65e1a2c49b..6cf37f15ad 100644 --- a/examples/pybind11/use_dpctl_sycl_kernel/CMakeLists.txt +++ b/examples/pybind11/use_dpctl_sycl_kernel/CMakeLists.txt @@ -27,7 +27,7 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(pybind11) -find_package(Python REQUIRED COMPONENTS Development.Module NumPy) +find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) find_package(Dpctl REQUIRED) set(py_module_name _use_kernel) diff --git a/examples/pybind11/use_dpctl_sycl_queue/CMakeLists.txt b/examples/pybind11/use_dpctl_sycl_queue/CMakeLists.txt index ec0a02283c..8fabdb3768 100644 --- a/examples/pybind11/use_dpctl_sycl_queue/CMakeLists.txt +++ b/examples/pybind11/use_dpctl_sycl_queue/CMakeLists.txt @@ -27,7 +27,7 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(pybind11) -find_package(Python REQUIRED COMPONENTS Development.Module NumPy) +find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) find_package(Dpctl REQUIRED) set(py_module_name _use_queue_device) diff --git a/pyproject.toml b/pyproject.toml index d5f9f0af32..2f16cecbe7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,6 @@ requires = [ "ninja>=1.11.1; platform_system!='Windows'", "cmake>=3.29.0", "cython>=3.1.0", - "numpy >=1.26.0", # WARNING: check with doc how to upgrade "versioneer[toml]==0.29" ] diff --git a/requirements.txt b/requirements.txt index d95e5a8ffd..0ab06b070b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ setuptools cython -numpy wheel