We don’t have any built-in utils for this, but you can do a simple version manually:
#include <torch/script.h>

#include <iostream>
#include <memory>

void tabs(size_t num) {
  for (size_t i = 0; i < num; i++) {
    std::cout << "\t";
  }
}

void print_modules(const torch::jit::script::Module& module, size_t level = 0) {
  std::cout << module.name().qualifiedName() << " (\n";
  for (const auto& module : module.get_modules()) {
    tabs(level + 1);
    print_modules(module.module, level + 1);
  }
  tabs(level);
  std::cout << ")\n";
}

int main(int argc, const char *argv[]) {
  torch::jit::script::Module container = torch::jit::load("m.pt");
  print_modules(container);
  return 0;
}