IntelPython / dpctl

Python SYCL bindings and SYCL-based Python Array API library
https://intelpython.github.io/dpctl/
Apache License 2.0
99 stars 29 forks source link

API documentation for tensor C API #1130

Open diptorupd opened 1 year ago

diptorupd commented 1 year ago

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?

oleksandr-pavlyk commented 2 weeks ago

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.