Skip to content

Commit ba5ab6d

Browse files
committed
Merge compilation into one bash file.
1 parent 8538145 commit ba5ab6d

File tree

2 files changed

+27
-32
lines changed

2 files changed

+27
-32
lines changed

README.md

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -69,41 +69,14 @@ Additional features not mentioned in the [report](https://arxiv.org/pdf/1702.021
6969
git clone https://github.com/ruotianluo/pytorch-faster-rcnn.git
7070
```
7171

72-
2. Choose your `-arch` option to match your GPU for step 3 and 4.
73-
74-
| GPU model | Architecture |
75-
| ------------- | ------------- |
76-
| TitanX (Maxwell/Pascal) | sm_52 |
77-
| GTX 960M | sm_50 |
78-
| GTX 1080 (Ti) | sm_61 |
79-
| Grid K520 (AWS g2.2xlarge) | sm_30 |
80-
| Tesla K80 (AWS p2.xlarge) | sm_37 |
81-
82-
**Note**: You are welcome to contribute the settings on your end if you have made the code work properly on other GPUs.
83-
84-
85-
3. Build RoiPooling module
86-
```
87-
cd pytorch-faster-rcnn/lib/layer_utils/roi_pooling/src/cuda
88-
echo "Compiling roi_pooling kernels by nvcc..."
89-
nvcc -c -o roi_pooling_kernel.cu.o roi_pooling_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52
90-
cd ../../
91-
python build.py
92-
cd ../../../
93-
```
94-
95-
96-
4. Build NMS
72+
2. Compile modules:
9773
```
98-
cd lib/nms/src/cuda
99-
echo "Compiling nms kernels by nvcc..."
100-
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52
101-
cd ../../
102-
python build.py
103-
cd ../../
74+
cd pytorch-faster-rcnn/lib
75+
bash make.sh
76+
cd ../
10477
```
10578

106-
5. Install the [Python COCO API](https://github.com/pdollar/coco). The code requires the API to access COCO dataset.
79+
3. Install the [Python COCO API](https://github.com/pdollar/coco). The code requires the API to access COCO dataset.
10780
```Shell
10881
cd data
10982
git clone https://github.com/pdollar/coco.git

lib/make.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CUDA_ARCH="-gencode arch=compute_30,code=sm_30 \
2+
-gencode arch=compute_35,code=sm_35 \
3+
-gencode arch=compute_50,code=sm_50 \
4+
-gencode arch=compute_52,code=sm_52 \
5+
-gencode arch=compute_60,code=sm_60 \
6+
-gencode arch=compute_61,code=sm_61 \
7+
-gencode arch=compute_70,code=sm_70 "
8+
9+
# Build RoiPooling module
10+
cd layer_utils/roi_pooling/src/cuda
11+
echo "Compiling roi_pooling kernels by nvcc..."
12+
nvcc -c -o roi_pooling_kernel.cu.o roi_pooling_kernel.cu -x cu -Xcompiler -fPIC $CUDA_ARCH
13+
cd ../../
14+
python build.py
15+
cd ../../
16+
# Build NMS
17+
cd nms/src/cuda
18+
echo "Compiling nms kernels by nvcc..."
19+
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC $CUDA_ARCH
20+
cd ../../
21+
python build.py
22+
cd ../

0 commit comments

Comments
 (0)