- Download prebuilt libtorch with cxx11 ABI option (the lastest version may be updated). Here, I use Torch v1.7.1 with CUDA-10.1 (I referenced from here):
Platform | Download |
---|---|
CPU | v1.7.1 ---- v1.8.0 ---- v1.8.1 |
CUDA-10.1 | v1.7.1 ---- v1.8.0 ---- v1.8.1 |
CUDA-10.2 | v1.8.1 |
CUDA-11.0 | v1.7.1 |
CUDA-11.1 | v1.8.0 ---- v1.8.1 |
-
Unzip libtorch to
<libtorch-root-dir>
, mine is~/Downloads/libtorch
-
Build OpenCV from source, instruction was updated here. I tested with OpenCV-4.5.2 with contrib stuffs
-
Setup UPC++ as following the instruction at here
-
There are three framework in this repo
- Compile a "hello world" program with LibTorch-CPU
- Compile a "hello world" program with LibTorch-GPU
- Compile a "hello world" program with Libtorch + UPCXX
- Compile a "hello world" program with Libtorch + UPCXX + OpenCV
- For script compilation with Jupyter Notebook, instruction was updated at here