Understanding PyTorch operators

Mainly looking for information about aten and prim operators. Is there documentation to look at all of them? What is the total number of them? It seems there’s a C API to use them directly but is there a Python API as well? Basically I want to be able to build a torchscript graph node by node with specific operators.

The aten and prim namespaces are considered internal details so we don’t really have user-facing documentation explaining them. The closest (for aten) is maybe https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/README.md.

There is are Python bindings to the PyTorch IR in (https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/python/python_ir.cpp), but once again they are considered internal.