Hi, I am going to test the SpMV performance on the IA hardware, and want to know if Intel-NumPy/SciPy has the support for the Intel i-GPUs, besides the Intel CPUs. If true, what operations should I make to use the GPUs in the Python code, like Cupy.
GPU support in scikit-learn is present for DBSCAN, K-Means, Linear Regression and Logistic Regression algorithms.
daal4py optimizations for GPU include KNN Classification, batch and streaming Covariance, DBSCAN, GBT Regression, K-Means, Linear & Logistic Regression, batch and streaming Low Order Moments, PCA, and binary SVM Classification.
Here is an example of running sklearn dbscan algorithm on gpu.
from daal4py.sklearn import patch_sklearn from daal4py.oneapi import sycl_context patch_sklearn() from sklearn.cluster import DBSCAN X = np.array([[1., 2.], [2., 2.], [2., 3.], [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32) with sycl_context("gpu"): clustering = DBSCAN(eps=3, min_samples=2).fit(X)
For numpy with GPU support you could try out dpnp – GPU-enabled Data Parallel NumPy, a collection of many NumPy algorithms accelerated for GPUs. You can find information on examples and usage of dpnp by following the below link
Thanks a lot for your feedback. I have two new question about dpnp. First, does this library contain any sparse matrix-cector operations, e.g. SpMV? Second, this library is based on a C++ library with SYCL based kernels, so do these kernels are those from oneMKL?
In limitations of dpnp.meshgrid it is mentioned sparse is supported only with a value of false. I couldnt find any mention of support for sparse matrix-vector operations with dpnp. However we will check internally and provide you a definitive response regarding sparse matrix/vector operations if any present in the library.
Regarding your second query, DPNP is a NumPy-like library accelerated with SYCL on Intel devices. It provides Python interfaces for many NumPy functions, and includes a subset of methods of :class:`dpnp.ndarray`. Under the hood it is based on native C++ and oneMKL based kernels.
I am an engineer working on your issue. Sparse functionality is supported in oneMKL (https://docs.oneapi.io/versions/latest/onemkl/oneapi-mkl-sparse-gemv.html) to execute of SYCL devices, but not presently available in dpnp. We will file this functionality and samples supporting this for dpnp and dpctl as a feature request for a feature release of the product.
This thread is now closed. Any additional comments to this thread will be considered community only.
If you need any additional information, please submit a new question as this thread will no longer be monitored.