i have done some unfinished work parsing comments here:
So while its better than nothing making it perfect will require much more time/work. How does it work ? I implemented a parser which
can read stubs also with c like annotations trying to turn them into Python types. So the ARGS: ARGS\n===== like parts of comments
get read and understood often. There are many exceptions and a view types in codes such as older cupy I looked into. The idea is to automate
what can be automated and add some rules so that type stubs for the version you're using can be derived.
The links in your post mainly focus on understanding the signatures only but most information actually is found in comments for cupy/cuda.
the experiment1.py actually creates some stubs. And test-cython-parser.py shows that cython could be used but is unfinished.
It lists the classes and (c)defs already like the links above.