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 2.
There is are Python bindings to the PyTorch IR in (https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/python/python_ir.cpp 2), but once again they are considered internal.