Are you using a recent version of PyTorch (and compiled with C++14?). We made a recent improvement in the quantized backend library 3 (fbgemm) to make use of read-write lock from C++14 and these are not supported on MacOS due to issues. Are you running it on MacOS?

  
      github.com
  
  
    pytorch/FBGEMM/blob/master/src/CodeCache.h#L12-L16 1

#if __cplusplus >= 201402L && !defined(__APPLE__)
// For C++14, use shared_timed_mutex.
// some macOS C++14 compilers don't support shared_timed_mutex.
#define FBGEMM_USE_SHARED_TIMED_MUTEX
#endif