The error is caused by our poor support for MSVC OpenMP in detectron. Please build with MKL so Intel OpenMP will be used. See https://pytorch.org/docs/stable/notes/windows.html#include-optional-components 300.