I solved the problem. I modified the c10/core/Device.h and c10/core/Device.cpp files by moving the implementation of Device::validate method to the cpp file. Also I added additional constructor ThreadPool(std::size_t pool_size,int numa_node_id) to the class c10::ThreadPool. It seems that there are some inconsistency in the linkage options for the c10 library.