编译pytorch源码
clone pytorch源码:
(base) xueruini@nico2:~/onion_rain/pytorch/code$ git clone --recursive https://github.com/pytorch/pytorch
Cloning into 'pytorch'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
...
Resolving deltas: 100% (151/151), done.
Submodule path 'third_party/tensorpipe/third_party/pybind11/tools/clang': checked out '6a00cbc4a9b8e68b71caf7f774b3f9c753ae84d5'
Submodule path 'third_party/zstd': checked out 'aec56a52fbab207fc639a1937d1e708a282edca8'
(base) xueruini@nico2:~/onion_rain/pytorch/code$ cd pytorch
(base) xueruini@nico2:~/onion_rain/pytorch/code/pytorch$ ls
android aten.bzl binaries c10 CITATION CMakeLists.txt CODEOWNERS docker docker.Makefile ios Makefile mypy.ini README.md scripts submodules third_party torch version.txt
aten benchmarks BUILD.bazel caffe2 cmake CODE_OF_CONDUCT.md CONTRIBUTING.md Dockerfile docs LICENSE modules NOTICE requirements.txt setup.py test tools ubsan.supp WORKSPACE
切换到release版本
(pytorch) xueruini@nico2:~/onion_rain/pytorch/code/pytorch$ git checkout v1.5.1
Checking out files: 100% (3139/3139), done.
Note: checking out 'v1.5.1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 3c31d73c87 [ONNX] Fix pow op