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

Commit ac1f3c3

Browse files
authored
Merge pull request #43 from facebookresearch/update-docs-template
Update docs install instructions, docker images and github issue template
2 parents d12ed79 + eb5f3c2 commit ac1f3c3

File tree

5 files changed

+55
-19
lines changed

5 files changed

+55
-19
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ When submitting a bug report, please include the following information (where re
1515
- Docker image (if using docker):
1616
- GCC/GXX version (if compiling from source):
1717
- LLVM/Tapir git hash used (if compiling from source):
18+
19+
To get the hash, run: `$HOME/clang+llvm-tapir5.0/bin/clang --version`
20+
1821
- Commit hash of our repo and submodules (if compiling from source):
1922

2023
In addition, including the following information will also be very helpful for us to diagnose the problem:

docs/source/installation_conda.rst

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ Now, clone the repo, build and install LLVM+Tapir:
7474
7575
$ git clone --recursive https://github.com/wsmoses/Tapir-LLVM llvm
7676
$ mkdir -p ${LLVM_SOURCES}/llvm_build && cd ${LLVM_SOURCES}/llvm_build
77-
$ ${CMAKE_VERSION} -DCMAKE_INSTALL_PREFIX=${CLANG_PREFIX} -DLLVM_TARGETS_TO_BUILD=X86 -DCOMPILER_RT_BUILD_CILKTOOLS=OFF -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_BUILD_TESTS=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON ../llvm/
77+
$ ${CMAKE_VERSION} -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_INSTALL_OCAMLDOC_HTML_DIR=/tmp -DLLVM_OCAML_INSTALL_PATH=/tmp -DCMAKE_INSTALL_PREFIX=${CLANG_PREFIX} -DLLVM_TARGETS_TO_BUILD=X86 -DCOMPILER_RT_BUILD_CILKTOOLS=OFF -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_BUILD_TESTS=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON ../llvm/
7878
$ make -j $CORES -s && make install -j $CORES -s
7979
$ cd $HOME && rm -rf $LLVM_SOURCES
8080
81+
8182
Step 4: Install Anaconda3
8283
^^^^^^^^^^^^^^^^^^^^^^^^^^
8384
In order to contribute to TC python/C++ API, you need to install TC from source. For this,
@@ -136,9 +137,14 @@ Now, Install cuDNN v6.0 (skip if you have it already):
136137
$ CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz"
137138
$ wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE}
138139
$ tar -xzvf ${CUDNN_TAR_FILE}
139-
$ sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include
140-
$ sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64/
141-
$ sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
140+
$ cp -P cuda/include/cudnn.h /usr/local/cuda/include
141+
$ cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64/
142+
$ chmod a+r /usr/local/cuda/lib64/libcudnn*
143+
144+
.. note::
145+
146+
Please use :code:`sudo` to run the command that might fail with permission issues. Otherwise, run
147+
the commands as is.
142148

143149
Set environment variables:
144150

@@ -161,7 +167,12 @@ to install the protobuf.
161167
162168
$ mkdir -p /tmp/proto-install && cd /tmp/proto-install
163169
$ wget --quiet https://github.com/google/protobuf/archive/v3.4.0.zip -O proto.zip && unzip -qq proto.zip -d .
164-
$ cd protobuf-3.4.0 && ./autogen.sh && ./configure && make -j 8 && sudo make install && sudo ldconfig
170+
$ cd protobuf-3.4.0 && ./autogen.sh && ./configure && make -j 8 && make install && ldconfig
171+
172+
.. note::
173+
174+
Please use :code:`sudo` to run the command that might fail with permission issues. Otherwise, run
175+
the commands as is.
165176

166177
Now check your proto version by running:
167178

docs/source/installation_conda_dep.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ to install the protobuf.
6565
$ wget --quiet https://github.com/google/protobuf/archive/v3.4.0.zip -O proto.zip && unzip -qq proto.zip -d .
6666
$ cd protobuf-3.4.0 && ./autogen.sh && ./configure && make -j 8 && make install && ldconfig
6767
68+
.. note::
69+
70+
Please use :code:`sudo` to run the command that might fail with permission issues. Otherwise, run
71+
the commands as is.
72+
73+
6874
Now check your proto version by running:
6975

7076
.. code-block:: bash
@@ -124,6 +130,11 @@ Now, Install cuDNN v6.0 (skip if you have it already):
124130
$ cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64/
125131
$ chmod a+r /usr/local/cuda/lib64/libcudnn*
126132
133+
.. note::
134+
135+
Please use :code:`sudo` to run the command that might fail with permission issues. Otherwise, run
136+
the commands as is.
137+
127138
Set environment variables:
128139

129140
.. code-block:: bash
@@ -144,7 +155,7 @@ conda packages of TC dependencies and then build TC.
144155
145156
$ conda create -y --name tc-build-conda python=3.6
146157
$ source activate tc-build-conda
147-
$ conda install -y -c prigoyal tapir50 llvm isl-tc gflags glog
158+
$ conda install -y -c prigoyal llvm-tapir50 isl-tc gflags glog
148159
$ conda install -y -c pytorch pytorch
149160
$ cd $HOME && git clone https://github.com/facebookresearch/TensorComprehensions.git --recursive
150161
$ cd TensorComprehensions

docs/source/installation_docker_image.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The conda and non-conda images for each setup are below:
1919

2020
.. code-block:: bash
2121
22-
$ docker run -i -t tensorcomprehensions/linux-trusty-gcc4.8-tapir5.0-cuda8-cudnn6-py3-conda:x86
22+
$ docker run -i -t tensorcomprehensions/linux-trusty-gcc4.8-tapir5.0-cuda8-cudnn6-py3-conda:x86_1
2323
2424
Now, follow the instructions below to build TC:
2525

@@ -31,7 +31,7 @@ Now, follow the instructions below to build TC:
3131

3232
.. code-block:: bash
3333
34-
$ docker run -i -t tensorcomprehensions/linux-trusty-gcc4.8-tapir5.0-cuda8-cudnn6-py3:x86
34+
$ docker run -i -t tensorcomprehensions/linux-trusty-gcc4.8-tapir5.0-cuda8-cudnn6-py3:x86_1
3535
3636
Now, to install TC, follow :ref:`non_conda_install_tc`
3737

@@ -40,7 +40,7 @@ Now, to install TC, follow :ref:`non_conda_install_tc`
4040

4141
.. code-block:: bash
4242
43-
$ docker run -i -t tensorcomprehensions/linux-xenial-gcc5-tapir5.0-cuda9-cudnn7-py3-conda:x86
43+
$ docker run -i -t tensorcomprehensions/linux-xenial-gcc5-tapir5.0-cuda9-cudnn7-py3-conda:x86_1
4444
4545
We don't ship the conda packages for TC dependencies that are compatible with gcc5 yet, so you have to
4646
build them from source. To install TC, see instructions here: :ref:`conda_install_tc`
@@ -50,7 +50,7 @@ build them from source. To install TC, see instructions here: :ref:`conda_instal
5050

5151
.. code-block:: bash
5252
53-
$ docker run -i -t tensorcomprehensions/linux-xenial-gcc5-tapir5.0-cuda9-cudnn7-py3:x86
53+
$ docker run -i -t tensorcomprehensions/linux-xenial-gcc5-tapir5.0-cuda9-cudnn7-py3:x86_1
5454
5555
Now, to install TC, follow :ref:`non_conda_install_tc`
5656

@@ -66,7 +66,7 @@ have :code:`nvidia-docker` installed. Then run the image using following command
6666

6767
.. code-block:: bash
6868
69-
$ nvidia-docker run --rm -i -t tensorcomprehensions/trusty-gcc4.8-py3-conda-cuda:x86
69+
$ nvidia-docker run --rm -i -t tensorcomprehensions/trusty-gcc4.8-py3-conda-cuda:x86_1
7070
7171
Now, follow the instructions below to build TC:
7272

docs/source/installation_non_conda.rst

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Step 1: Install some build dependencies
1313
.. code-block:: bash
1414
1515
$ apt-get update
16-
$ apt-get install -y libgoogle-glog-dev curl build-essential cmake git automake libgmp3-dev libtool ssh libyaml-dev realpath wget valgrind software-properties-common unzip
16+
$ apt-get install -y libgoogle-glog-dev curl build-essential cmake git automake libgmp3-dev libtool ssh libyaml-dev realpath wget valgrind software-properties-common unzip libz-dev
1717
1818
.. note::
1919

20-
You might additionally need to install :code:`cmake3` and :code:`libz-dev`, if these packages are not found by apt-get, you can proceed otherwise install them by running :code:`apt-get install libz-dev`
20+
You might additionally need to install :code:`cmake3`, if this package is not found by apt-get, you can proceed.
2121

2222
Step 2: Setup gcc / g++
2323
^^^^^^^^^^^^^^^^^^^^^^^
@@ -70,10 +70,11 @@ Now, clone the repo, build and install LLVM+Tapir:
7070
7171
$ git clone --recursive https://github.com/wsmoses/Tapir-LLVM llvm
7272
$ mkdir -p ${LLVM_SOURCES}/llvm_build && cd ${LLVM_SOURCES}/llvm_build
73-
$ ${CMAKE_VERSION} -DCMAKE_INSTALL_PREFIX=${CLANG_PREFIX} -DLLVM_TARGETS_TO_BUILD=X86 -DCOMPILER_RT_BUILD_CILKTOOLS=OFF -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_BUILD_TESTS=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON ../llvm/
73+
$ ${CMAKE_VERSION} -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_INSTALL_OCAMLDOC_HTML_DIR=/tmp -DLLVM_OCAML_INSTALL_PATH=/tmp -DCMAKE_INSTALL_PREFIX=${CLANG_PREFIX} -DLLVM_TARGETS_TO_BUILD=X86 -DCOMPILER_RT_BUILD_CILKTOOLS=OFF -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_BUILD_TESTS=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON ../llvm/
7474
$ make -j $CORES -s && make install -j $CORES -s
7575
$ cd $HOME && rm -rf $LLVM_SOURCES
7676
77+
7778
Step 4: Get CUDA and CUDNN
7879
^^^^^^^^^^^^^^^^^^^^^^^^^^
7980
In order to build TC, you also need to have :code:`CUDA` and :code:`CUDNN`. If you already have it
@@ -97,9 +98,14 @@ Now, Install cuDNN v6.0 (skip if you have it already):
9798
$ CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz"
9899
$ wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE}
99100
$ tar -xzvf ${CUDNN_TAR_FILE}
100-
$ sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include
101-
$ sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64/
102-
$ sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
101+
$ cp -P cuda/include/cudnn.h /usr/local/cuda/include
102+
$ cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64/
103+
$ chmod a+r /usr/local/cuda/lib64/libcudnn*
104+
105+
.. note::
106+
107+
Please use :code:`sudo` to run the command that might fail with permission issues. Otherwise, run
108+
the commands as is.
103109

104110
Set environment variables:
105111

@@ -118,7 +124,12 @@ to install the protobuf.
118124
119125
$ mkdir -p /tmp/proto-install && cd /tmp/proto-install
120126
$ wget --quiet https://github.com/google/protobuf/archive/v3.4.0.zip -O proto.zip && unzip -qq proto.zip -d .
121-
$ cd protobuf-3.4.0 && ./autogen.sh && ./configure && make -j 8 && sudo make install && sudo ldconfig
127+
$ cd protobuf-3.4.0 && ./autogen.sh && ./configure && make -j 8 && make install && ldconfig
128+
129+
.. note::
130+
131+
Please use :code:`sudo` to run the command that might fail with permission issues. Otherwise, run
132+
the commands as is.
122133

123134
Now check your proto version by running:
124135

@@ -136,7 +147,7 @@ dependencies and updating your Python:
136147

137148
.. code-block:: bash
138149
139-
$ sudo apt-get install -y python3-dev python3-pip python3-setuptools
150+
$ apt-get install -y python3-dev python3-pip python3-setuptools
140151
$ pip3 install --upgrade pip
141152
$ pip3 install numpy pyyaml
142153

0 commit comments

Comments
 (0)