Mac arm64源码安装pytocrch CPU
下载安装
% git clone -b master --recurse-submodule https://github.com/pytorch/pytorch.git
% mkdir pytorch-build
% cd pytorch-build
% cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DPYTHON_EXECUTABLE:PATH=`which python3` -DCMAKE_INSTALL_PREFIX:PATH=../pytorch-install ../pytorch
% cmake --build . --target install
上述过程创建了一个名为 pytorch-install 的目录。
pytorch-install 即是所需要的cpu版本的libtocrch, 其相应目录如下
bin
include
lib
share