It’s always good to look at the very first error, in your case /export/apps/pytorch/libtorch/include/c10/core/TensorTypeIdRegistration.h:16:18: error: atomic: No such file or directory. So gcc 4.4 does not have support for #include <atomic>, you need to find a newer gcc.
Best regards
Thomas