4

更新:我尝试了我队友之前下载的v1.1.0源,然后这个问题就消失了。似乎主分支(190604)存在以下问题。尝试使用标签 v1.1.0 而不是 master。


我从 github 下载了 pytorch 源来构建 libtorch。使用以下命令:

git clone [pytorch git] --recursive

然后运行

python setup.py build

然后得到以下错误消息:

[ 46%] Building CXX object caffe2/CMakeFiles/caffe2.dir/__/aten/src/TH/THTensorMoreMath.cpp.o
/home/in4ight/libtorch/pytorch/aten/src/ATen/native/quantized/cpu/qlinear_unpack.cpp: In member function ‘at::Tensor at::native::{anonymous}::QLinearUnpackWeightInt8::operator()(at::Tensor)’:
/home/in4ight/libtorch/pytorch/aten/src/ATen/native/quantized/cpu/qlinear_unpack.cpp:37:12: error: ‘class fbgemm::PackBMatrix<signed char>’ has no member named ‘unpack’
     packB->unpack(weight_ptr_int8);

如何正确构建 libtorch?

4

0 回答 0