Not sure there’s any way to get just the name “Conv2d”, but the pretty_print() function outputs the name (alongside other module properties).
As a workaround, you could use that with, for example, a std::stringstream and do some post-processing on the string to pull out the part you want.
If that doesn’t work for you, I suggest opening a feature request issue on the PyTorch GitHub page 1.