cuml icon indicating copy to clipboard operation
cuml copied to clipboard

Can cuml APIs be called inside numba kernals ?

Open ammaryasirnaich opened this issue 2 years ago • 2 comments

Can we use cuml methods with numba kernals ?

ammaryasirnaich avatar Jul 29 '22 17:07 ammaryasirnaich

You could very well call the cuML/RAFT APIs before or after the use of NUMBA kernels as long as you take care of streams synchronization. However, a Numba thread won't be able to call the cuML/RAFT APIs.

viclafargue avatar Aug 08 '22 14:08 viclafargue

@ammaryasirnaich what is your usecase? As @viclafargue numba and RAPIDS are compatible (we even have used numba in many parts of the stack), mainly through the use of cuda_array_interface, so operations are efficient without memory copies.

dantegd avatar Aug 10 '22 18:08 dantegd

@dantegd actually i want to run the cuml.dask.cluster.DBSCAN() parallel on feature set (14000,10) row-wise. I don't think the function runs on a specific dimension if given. I had some experiments to run histograms in the same fashion, for that I had to write a cuda kernal using numba.

ammaryasirnaich avatar Aug 11 '22 12:08 ammaryasirnaich

You could very well call the cuML/RAFT APIs before or after the use of NUMBA kernels as long as you take care of streams synchronization. However, a Numba thread won't be able to call the cuML/RAFT APIs.

Many thanks for the response

ammaryasirnaich avatar Aug 11 '22 12:08 ammaryasirnaich

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] avatar Sep 10 '22 13:09 github-actions[bot]