dpctl icon indicating copy to clipboard operation
dpctl copied to clipboard

API documentation for tensor C API

Open diptorupd opened this issue 2 years ago • 1 comments

The C API for dpctl and dpctl.tensor.usm_ndarray currently is auto-generated using Cython. A problem with using Cython to auto-generate the headers is the complete lack of API documentation.

For dpctl, it is perhaps not that important as the C API is a wrapper around libsyclinterface and sycl and the users for the C API for the dpctl classes might always be rather limited (e.g. numba-dpex/dpnp).

I feel dpctl.tensor.usm_ndarray is more important from the perspective of integration with other native extensions. Therefore, we should have a documented API for the C interface of dpctl.tensor.usm_ndarray.

Given the limitations of Cython, what other alternatives do we have?

diptorupd avatar Mar 19 '23 04:03 diptorupd

Cython-generated C-API is document here: https://intelpython.github.io/dpctl/latest/api_reference/dpctl_capi.html

The documentation page is hand generated though.

oleksandr-pavlyk avatar Sep 16 '24 17:09 oleksandr-pavlyk