It seems that you are trying to build libtorch using cmake, the error means that the cpp file related to the function cannot be found. One way to work around this is to download the distributed binary: from https://pytorch.org/ 1, pick C++ language.