In the previous posts, we have gone through the installation processes for deep learning infrastructure, such as Docker, nvidia-docker, CUDA Toolkit and cuDNN. With the infrastructure setup, we may conveniently start delving into deep learning: building, training, and validating deep neural network models, and applying the models into a certain problem domain. Translating deep learning primitives into low level bytecode execution can be an enormous task, especially for practitioners without interests in the deep learning calculus. Fortunately, there are several deep learning frameworks that provide the high level programming interface to assist in performing deep learning tasks.
In this post, we will go through the installation of Caffe2, one of the major deep learning frameworks. Caffe2 is adopted from Caffe, a deep learning framework developed by the Barkeley Vision and Learning Center (BVLC) of UC Berkeley. Caffe2 was started with the aim to improve Caffe especially to better support large-scale distributed model training, mobile deployment, reduced precision computation, new hardware, and flexibility of porting to multiple platforms. Continue reading
When performing deep learning tasks especially on a single physical machine, there can be a moment where we need to execute tasks in parallel. Suppose that we are evaluating different models. We may need a task to calculate the precision and recall of a certain model while at the same time we are in need for training another model. We can proceed with the sequential operation, doing the tasks one by one. But life will be much easier if the tasks can be done in parallel. A possible route to achieving this is by creating several containers and perform distinct task in each container.
NVIDIA provides a utility called nvidia-docker. The utility enables creation of Docker containers that leverage CUDA GPU computing when being run. Under the hood, nvidia-docker will add a new Docker runtime called nvidia during the installation. By specifying this runtime when invoking a command in a (new) Docker container, the command execution will be accelerated with the GPUs. Continue reading
If you are doing deep learning AI research and/or development with GPUs, big chance you will be using graphics card from NVIDIA to perform the deep learning tasks. A vantage point with GPU computing is related with the fact that the graphics card occupies the PCI / PCIe slot. From the frugality point of view, it may be a brilliant idea to scavenge unused graphics cards from the fading PC world and line them up on another unused desktop motherboard to create a somewhat powerful compute node for AI tasks. Maybe not.
With the increasing popularity of container-based deployment, a system architect may consider creating several containers with each running different AI tasks. This means that that the underlying GPU resources should then be shared among the containers. NVIDIA provides a utility called NVIDIA Docker or nvidia-docker2 that enables the containerization of a GPU-accelerated machine. As the name suggests, the utility targets Docker container type. Continue reading
CUDA Deep Neural Network (cuDNN) is a library from NVIDIA that provides the GPU-accelerated primitives for deep learning such as convolution, pooling, normalization, activation layers, tensor transformation. With cuDNN, a machine learning researcher or developer can spend less time writing the implementation for low-level GPU performance tuning. The cuDNN library powers major deep learning frameworks such as Caffe, Caffe 2, Tensor Flow, Cognitive Toolkit and PyTorch.
This post summarizes the steps to install cuDNN 7 for Cuda Toolkit 9.1 on Ubuntu 16.04. Installation for different version of cuDNN and Cuda Toolkit may require additional tweak or different steps that are not covered in this post. Continue reading
With advances in GPU technologies, performing complex computation is not an exclusive feat of multicore CPUs anymore. It is not uncommon to perform computation for linear algebra, image and video processing, machine learning (especially deep learning), graph analytics, and so forth on GPU.
NVIDIA graphic cards have gained popularity among machine learning researchers and practitioners as the base hardware for GPU computing. To harness the GPU power, NVIDIA develops and provides CUDA toolkit that can be used as the development environment and libraries for GPU-accelerated applications.
If you are using Ubuntu 16.04 (Xenial) and want to install the recent release of CUDA toolkit (version 9.1), this post may help. The official installation guide is available at the NVIDIA website and can be referenced when following the steps outlined in this post. Continue reading