This repo stores 'hello_world' compilation of UPC++, LibTorch, OpenCV

  1. 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
  1. Unzip libtorch to <libtorch-root-dir>, mine is ~/Downloads/libtorch

  2. Build OpenCV from source, instruction was updated here. I tested with OpenCV-4.5.2 with contrib stuffs

  3. Setup UPC++ as following the instruction at here

  4. 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
  1. For script compilation with Jupyter Notebook, instruction was updated at here