Deep Learning
Compile Caffe without Root Privileges
On shared servers or HPC clusters, you often don’t have sudo access, which makes installing system-level dependencies impossible. In this tutorial, we are going to introduce how to install Caffe entirely in user space, without root privileges. We assume that you have installed Anaconda and CUDA on your PC. Note: This tutorial is based on CUDA 9.0, Caffe 1.0, protobuf 3.2.0, and OpenCV 3.4.3. You may need to adjust the version numbers for your own setup.
Build PyTorch Extensions with CUDA and CFFI
Deprecated warning: PyTorch 1.0+ replaced the old TH/THC tensor backend with ATen, and the torch.utils.ffi toolchain described here was removed along the way. If you target PyTorch 1.0 or newer, write your extensions with torch.utils.cpp_extension instead, see this GitHub repository for a working example. The article below documents the older CFFI-based approach and is kept for reference. Python is one of the most popular languages for deep learning, but as an interpreted language it is slow at tight numerical loops. Most of the time this does not matter, because the heavy lifting happens inside libraries written in C and CUDA. It starts to matter the moment you need an operation that the framework does not provide out of the box.