PyTorch Release 21.06

PyTorch Release 21.06 (PDF)

The NVIDIA container image for PyTorch, release 21.06, 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 pre-built and installed in Conda default environment (/opt/conda/lib/python3.8/site-packages/torch/) in the container image. The container also includes the following:

Driver Requirements

Release 21.06 is based on NVIDIA CUDA 11.3.1, which requires NVIDIA Driver release 465.19.01 or later. However, if you are running on Data Center GPUs (formerly Tesla), for example, T4, you may use NVIDIA driver release 418.40 (or later R418), 440.33 (or later R440), 450.51 (or later R450), or 460.27 (or later R460). The CUDA driver's compatibility package only supports particular drivers. For a complete list of supported drivers, see the CUDA Application Compatibility topic. For more information, see CUDA Compatibility and Upgrades and NVIDIA CUDA and Drivers Support.

GPU Requirements

Release 21.06 supports CUDA compute capability 6.0 and higher. This corresponds to GPUs in the Pascal, Volta, Turing, and NVIDIA Ampere GPU architecture families. Specifically, for a list of GPUs that this compute capability corresponds to, 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.


  • 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, please use NVIDIA Deep Learning Profiler (DLProf). DLProf can help data scientists, engineers and researchers understand and improve performance of their models with visualization via DLProf Viewer in the web browser, or by analyzing text reports. DL Prof is available on NGC or a Python PIP wheel installation.

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 older container versions, refer to the Frameworks Support Matrix.

Container Version Ubuntu CUDA Toolkit PyTorch TensorRT
21.06 20.04 NVIDIA CUDA 11.3.1 1.9.0a0+c3d40fd TensorRT
21.05 NVIDIA CUDA 11.3.0 1.9.0a0+2ecb2c7
21.03 NVIDIA CUDA 11.2.1 1.9.0a0+df837d0 TensorRT
21.02 NVIDIA CUDA 11.2.0 1.8.0a0+52ea372 TensorRT
20.12 NVIDIA CUDA 11.1.1 1.8.0a0+1606899 TensorRT 7.2.2


NVIDIA CUDA 11.1.0 1.8.0a0+17f8c32 TensorRT 7.2.1
20.10 1.7.0a0+7036e91
20.09 NVIDIA CUDA 11.0.3 1.7.0a0+8deb4fe TensorRT 7.1.3
20.08 1.7.0a0+6392713
20.07 NVIDIA CUDA 11.0.194 1.6.0a0+9907a3e
20.06 NVIDIA CUDA 11.0.167 TensorRT 7.1.2
20.03 NVIDIA CUDA 10.2.89 1.5.0a0+8f84ded TensorRT 7.0.0
20.02 1.5.0a0+3bbb36e





TensorRT 6.0.1
19.10 NVIDIA CUDA 10.1.243 1.3.0a0+24ae9b5
19.09 1.2.0
19.08 1.2.0a0 including upstream commits up through commit 9130ab38 from July 31, 2019 as well as a cherry-picked TensorRT 5.1.5

Automatic Mixed Precision (AMP)

Automatic Mixed Precision (AMP) for PyTorch is available in this container through the native implementation as well as 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 choose 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.amp can 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 NVIDIA GPU Cloud (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 Volta and Turing, therefore 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. This container includes the following tensor core examples.

Known Issues

  • Known performance regressions in 21.06 vs. 21.05:
    • On Turing and NVIDIA Ampere Architecture GPUs:
      • Up to 15% performance drop for GNMT training
    • On Volta:
      • Up to 20% performance drop for Tacotron training.
  • Manual synchronization is required in CUDA graphs workloads between graph replays.
  • The PyTorch container includes a version of Django with a known vulnerability that was discovered late in our QA process. See CVE-2021-31542 for details. This will be fixed in the next release.
  • The PyTorch container includes a version of Pillow with known vulnerabilities discovered late in our QA process. See CVE-2021-25287, CVE-2021-28676, CVE-2021-28677, and CVE-2021-25288 for details. This will be fixed in the next release.
© Copyright 2023, NVIDIA. Last updated on Sep 5, 2023.