-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile_ops.sh
More file actions
executable file
·34 lines (31 loc) · 838 Bytes
/
compile_ops.sh
File metadata and controls
executable file
·34 lines (31 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Compile CUDA extensions for pudm_extension.
# Run from the pudm_extension/ root directory.
set -e
echo "=== Compiling Chamfer3D ==="
cd src/metrics
python -c "
import torch
from torch.utils.cpp_extension import load
import os
chamfer = load(
name='chamfer_3D',
sources=[os.path.join(os.path.dirname(__file__), 'chamfer_cuda.cpp'),
os.path.join(os.path.dirname(__file__), 'chamfer3D.cu')],
verbose=True
)
print('Chamfer3D compiled successfully.')
"
cd ../..
echo "---- Chamfer3D ---> Done ----"
echo ""
echo "=== Compiling pointops ==="
cd src/ops/pointops
pip install -e .
cd ../../..
echo "---- pointops ---> Done ----"
echo ""
echo "Note: pointnet2_ops and chamfer3d_legacy use JIT compilation."
echo "They will compile automatically on first import."
echo ""
echo "All CUDA extensions ready!"