The documents of C extension

I am trying to write a function using the C extension of PyTorch, but I can’t find a detailed document about this part. Can you help me with some documents of the usage of pytorch’s c extension, such as the attribute functions of tensor, and some APIs that already exist.
Thank you very much !!!