Is PyTorch supposed to be thread-safe?

PyTorch underlying C++ library is expected to be thread safe (although the Tensor object is not thread-safe for multiple writers; you need to synchronize that yourself). So if you are getting multithreading related segfaults, if you have a repro, please report us an issue.