Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 3e097e0

Browse files
authored
Merge pull request #312 from facebookresearch/doc-pth-source
Add instuctions for building TC with PyTorch master build
2 parents 2cd56da + 4edb5b3 commit 3e097e0

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

docs/source/installation_conda.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,40 @@ Now, you need to install TC from source. For installing TC from source, checkout
200200
.. note::
201201
Please also make sure that you don't have gflags or glog in your system path. Those might conflict with the TC gflags/glog.
202202

203+
Optional: Building TC with PyTorch master
204+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
205+
206+
If you are interested in using PyTorch master with TC, there are two options:
207+
208+
- Install PyTorch nightly conda package (these packages are built for PyTorch master every day) OR
209+
- Install PyTorch from source
210+
211+
For the above two options, the :code:`Install TC` instructions would be as below:
212+
213+
**1. Using PyTorch nightly**:
214+
215+
.. code-block:: bash
216+
217+
$ conda create -y --name tc-build-conda python=3.6 && source activate tc-build-conda
218+
$ conda install -y pyyaml mkl-include
219+
$ conda install -yc conda-forge pytest
220+
$ conda install -y pytorch-nightly -c pytorch
221+
$ cd $HOME && git clone https://github.com/facebookresearch/TensorComprehensions.git --recursive
222+
$ cd TensorComprehensions && git submodule update --init --recursive
223+
$ BUILD_TYPE=Release INSTALL_PREFIX=$CONDA_PREFIX WITH_CAFFE2=OFF CLANG_PREFIX=$(llvm-config --prefix) ./build.sh --all
224+
225+
**1. With PyTorch install from source**:
226+
227+
.. code-block:: bash
228+
229+
$ conda create -y --name tc-build-conda python=3.6 && source activate tc-build-conda
230+
$ cd $HOME && git clone --recursive https://github.com/pytorch/pytorch && cd pytorch && git submodule update --init --recursive
231+
$ conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
232+
$ python setup.py install
233+
$ cd $HOME && git clone https://github.com/facebookresearch/TensorComprehensions.git --recursive
234+
$ cd TensorComprehensions && git submodule update --init --recursive
235+
$ BUILD_TYPE=Release INSTALL_PREFIX=$CONDA_PREFIX WITH_CAFFE2=OFF CLANG_PREFIX=$(llvm-config --prefix) ./build.sh --all
236+
203237
204238
Step 8: Verify TC installation
205239
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

docs/source/installation_conda_dep.rst

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ conda packages of TC dependencies and then build TC.
126126
.. code-block:: bash
127127
128128
$ conda create -y --name tc-build-conda python=3.6 && source activate tc-build-conda
129-
$ conda install -y -c tensorcomp llvm-tapir50 isl-tc gflags glog protobuf
129+
$ conda install -y -c tensorcomp llvm-tapir50 gflags glog protobuf
130130
$ conda install -y -c pytorch pytorch
131131
$ cd $HOME && git clone https://github.com/facebookresearch/TensorComprehensions.git --recursive
132132
$ cd TensorComprehensions && git submodule update --init --recursive
@@ -136,6 +136,43 @@ conda packages of TC dependencies and then build TC.
136136
Please also make sure that you don't have :code:`gflags` or :code:`glog` in your system path. Those might conflict with the TC gflags/glog.
137137

138138

139+
Optional: Building TC with PyTorch master
140+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141+
142+
If you are interested in using PyTorch master with TC, there are two options:
143+
144+
- Install PyTorch nightly conda package (these packages are built for PyTorch master every day) OR
145+
- Install PyTorch from source
146+
147+
For the above two options, the :code:`Install TC` instructions would be as below:
148+
149+
**1. Using PyTorch nightly**:
150+
151+
.. code-block:: bash
152+
153+
$ conda create -y --name tc-build-conda python=3.6 && source activate tc-build-conda
154+
$ conda install -y -c tensorcomp llvm-tapir50 gflags glog protobuf
155+
$ conda install -y pyyaml mkl-include
156+
$ conda install -yc conda-forge pytest
157+
$ conda install -y pytorch-nightly -c pytorch
158+
$ cd $HOME && git clone https://github.com/facebookresearch/TensorComprehensions.git --recursive
159+
$ cd TensorComprehensions && git submodule update --init --recursive
160+
$ BUILD_TYPE=Release INSTALL_PREFIX=$CONDA_PREFIX WITH_CAFFE2=OFF CLANG_PREFIX=$(llvm-config --prefix) ./build.sh --all
161+
162+
**1. With PyTorch install from source**:
163+
164+
.. code-block:: bash
165+
166+
$ conda create -y --name tc-build-conda python=3.6 && source activate tc-build-conda
167+
$ conda install -y -c tensorcomp llvm-tapir50 gflags glog protobuf
168+
$ cd $HOME && git clone --recursive https://github.com/pytorch/pytorch && cd pytorch && git submodule update --init --recursive
169+
$ conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
170+
$ python setup.py install
171+
$ cd $HOME && git clone https://github.com/facebookresearch/TensorComprehensions.git --recursive
172+
$ cd TensorComprehensions && git submodule update --init --recursive
173+
$ BUILD_TYPE=Release INSTALL_PREFIX=$CONDA_PREFIX WITH_CAFFE2=OFF CLANG_PREFIX=$(llvm-config --prefix) ./build.sh --all
174+
175+
139176
Step 6: Verify TC installation
140177
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141178

0 commit comments

Comments
 (0)