PyTorch Release 22.07
The NVIDIA container image for PyTorch, release 22.07, is available on NGC.
Contents of the PyTorch container
This container image contains the complete source of the version of PyTorch in
/opt/pytorch. It is prebuilt and installed in the Conda default environment (
/opt/conda/lib/python3.8/site-packages/torch/) in the container image.
The container also includes the following:
- Ubuntu 20.04 including Python 3.8
- NVIDIA CUDA® 11.7 Update 1 Preview
- NVIDIA cuBLAS 184.108.40.206
- NVIDIA cuDNN 8.4.1
- NVIDIA NCCL 2.12.12 (optimized for NVIDIA NVLink®)
- NVIDIA RAPIDS™ 22.04 (For x86, only these libraries are included: cudf, xgboost, rmm, cuml, and cugraph.)
- rdma-core 36.0
- NVIDIA HPC-X 2.10 with UCX 1.12.0
- OpenMPI 4.1.2rc4+
- GDRCopy 2.3
- TensorBoard 2.9.0
- Nsight Compute 2022.2.1
- Nsight Systems 2022.1.3.3
- NVIDIA TensorRT™ 8.4.1
- Torch-TensorRT 1.1.0a0
- NVIDIA DALI® 1.15.0
- MAGMA 2.6.2
- Jupyter and JupyterLab:
Release 22.07 is based on CUDA 11.7 Update 1 Preview, which requires NVIDIA Driver release 515 or later. However, if you are running on a data center GPU (for example, T4 or any other data center GPU), you can use NVIDIA driver release 450.51 (or later R450), 470.57 (or later R470), or 510.47 (or later R510). The CUDA driver's compatibility package only supports particular drivers. Thus, users should upgrade from all R418, R440, and R460 drivers, which are not forward-compatible with CUDA 11.7. For a complete list of supported drivers, see the CUDA Application Compatibility topic. For more information, see CUDA Compatibility and Upgrades.
Release 22.07 supports CUDA compute capability 6.0 and later. This corresponds to GPUs in the NVIDIA Pascal, NVIDIA Volta™, NVIDIA Turing™, and NVIDIA Ampere GPU architecture families. For a list of GPUs to which this compute capability corresponds, see CUDA GPUs. For additional support details, see Deep Learning Frameworks Support Matrix.
Key Features and Enhancements
This PyTorch release includes the following key features and enhancements.
- NVIDIA Deep Learning Profiler (DLProf) v1.8, which was included in the 21.12 container, was the final release of DLProf.
Starting with the 22.01 container, DLProf is no longer included, but it can still be manually installed by using a pip wheel on the
- A preview of Torch-TensorRT (1.1.0a0) is now included.
Torch-TRT is the TensorRT integration for PyTorch and brings the capabilities of TensorRT directly to Torch in one line Python and C++ APIs.
- Starting with the 22.05 release, the PyTorch container is available for the Arm SBSA platform.
- Deep learning framework containers 19.11 and later include experimental support for Singularity v3.0.
- Starting in 21.06, PyProf will no longer be included in the NVIDIA PyTorch container.
To profile models in PyTorch, use DLProf.
DLProf can help data scientists, engineers, andand researchers underst and improve performance of their models with visualization by using the DLProf Viewer in a web browser or by analyzing text reports. DL Prof is available on NGC or through a Python PIP wheel installation.
- The TensorCore example models are no longer provided in the core PyTorch container (previously shipped in
You can obtain the models from Github or the NVIDIA GPU Cloud (NGC) instead. Some Python packages that were included in previous containers to support these example models have also been removed. Depending on their specific use cases, you might need to add some packages that were previously preinstalled.
NVIDIA PyTorch Container Versions
The following table shows what versions of Ubuntu, CUDA, PyTorch, and TensorRT are supported in each of the NVIDIA containers for PyTorch. For earlier container versions, refer to the Frameworks Support Matrix.
Automatic Mixed Precision (AMP)
Automatic Mixed Precision (AMP) for PyTorch is available in this container through the native implementation and a preinstalled release of Apex. AMP enables users to try mixed precision training by adding only 3 lines of Python to an existing FP32 (default) script. AMP will select an optimal set of operations to cast to FP16. FP16 operations require 2X reduced memory bandwidth (resulting in a 2X speedup for bandwidth-bound operations like most pointwise ops) and 2X reduced memory storage for intermediates (reducing the overall memory consumption of your model). Additionally, GEMMs and convolutions with FP16 inputs can run on Tensor Cores, which provide an 8X increase in computational throughput over FP32 arithmetic.
Apex AMP is included to support models that currently rely on it, but
torch.cuda.amp is the future-proof alternative and offers a number of advantages over Apex AMP.
- Guidance and examples demonstrating
torch.cuda.ampcan be found here.
- Apex AMP examples can be found here.
For more information about AMP, see the Training With Mixed Precision Guide.
Tensor Core Examples
The tensor core examples provided in GitHub and NGC focus on achieving the best performance and convergence from NVIDIA Volta™ tensor cores by using the latest deep learning example networks and model scripts for training. Each example model trains with mixed precision Tensor Cores on NVIDIA Volta and NVIDIA Turing™, so you can get results much faster than training without Tensor Cores. This model is tested against each NGC monthly container release to ensure consistent accuracy and performance over time.
- ResNeXt101-32x4d model: This model was introduced in the Aggregated Residual Transformations for Deep Neural Networks paper.
It is based on the regular ResNet model, which substitutes 3x3 convolutions in the bottleneck block for 3x3 grouped convolutions. This model script is available on GitHub.
- SE-ResNext model: This ResNeXt101-32x4d model has an added Squeeze-and-Excitation (SE) module that was introduced in the Squeeze-and-Excitation Networks paper.
This model script is available on GitHub.
- TransformerXL model: This transformer-based language model has a segment-level recurrence and a novel relative positional encoding.
The enhancements that were introduced in Transformer-XL help capture better long-term dependencies by attending to tokens from multiple previous segments. Our implementation is based on the codebase that was published by the authors of the Transformer-XL paper. Our implementation uses modified model architecture hyperparameters, our modifications were made to achieve better hardware usage and to take advantage of Tensor Cores.
This model script is available on GitHub.
- Jasper model: This repository provides an implementation of the Jasper model in PyTorch from the Jasper: An End-to-End Convolutional Neural Acoustic Model paper.
The Jasper model is an end-to-end neural acoustic model for automatic speech recognition (ASR) that provides near state-of-the-art results on LibriSpeech among end-to-end ASR models without external data.
- BERT model: Bidirectional Encoder Representations from Transformers (BERT) is a new method of pretraining language representations which obtains state-of-the-art results on a wide array of Natural Language Processing (NLP) tasks.
This model is based on the BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding paper. NVIDIA's BERT implementation is an optimized version of the Hugging Face implementation paper that leverages mixed-precision arithmetic and Tensor Cores on V100 GPUs for faster training times while maintaining target accuracy.
- Mask R-CNN model: Mask R-CNN is a convolution-based neural network that is used for object instance segmentation.
The paper describing the model can be found here. NVIDIA’s Mask R-CNN model is an optimized version of Facebook’s implementation, which leverages mixed precision arithmetic by using Tensor Cores on NVIDIA V100 GPUs for 1.3x faster training time while maintaining target accuracy.
- Tacotron 2 and WaveGlow v1.1 model: This text-to-speech (TTS) system is a combination of the following neural network models:
- A modified Tacotron 2 model from the Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions paper
- A flow-based neural network model from the WaveGlow: A Flow-based Generative Network for Speech Synthesis paper.
- SSD300 v1.1 model: This model is based on the SSD: Single Shot MultiBox Detector paper.
The main difference between this model and the model described in the paper is in the backbone. Specifically, the VGG model is obsolete and has been replaced by the ResNet50 model.
- Neural Collaborative Filtering (NCF) model: This model focuses on providing recommendations, which is also known as collaborative filtering with implicit feedback.
The training data for this model should contain binary information about whether a user interacted with a specific item. NCF was first described by Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu and Tat-Seng Chua in the Neural Collaborative Filtering paper.
- ResNet50 v1.5 model: This model is a modified version of the original ResNet50 v1 model.
- GNMT v2 model: This model is similar to the model that is discussed in the Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation paper.