legacy.nn is there for backwards compatibility with lua torch.
If you can find implementations for operations in python, then that means those ops are not being implemented in c++. In general our c++ implementations are faster than their python counterparts.
It depends on what operation you’re looking for, but a number of those can be found here: https://github.com/pytorch/pytorch/tree/master/aten/src/TH/generic 16