PaddlePaddle 2.4.2 Release: Performance Optimizations and Bug Fixes

Baidu's PaddlePaddle released version 2.4.2, focusing on performance optimizations and stability fixes for both training and inference workflows.

Training Framework Updates

The training framework received several performance and stability improvements. Vendor claims indicate the introduction of Cutlass to implement a fused kernel for GEMM+gather+scatter operations. This change is accompanied by optimizations for sparse convolution training and inference, as well as improved batch normalization performance for 1D inputs.

Bug fixes address critical memory management and compilation issues. Notably, the release resolves a reference counting error in paddle.utils.dlpack.to_dlpack that could cause memory to be destructed unexpectedly. It also fixes out-of-bounds memory access in paddle.multiplex for multi-dimensional tensors and compilation failures on gcc54 environments. Additionally, the release fixes a hang issue in pipeline parallelism caused by inconsistent tensor dimensions and resolves a bug where backward propagation failed for layers without parameters in dynamic-to-static mode.

Deployment and Inference

The Paddle Inference module saw improvements to mixed-precision inference. The implementation of convert_to_mixed_precision was refactored, and a precision parameter was added to the enable_use_gpu interface to support one-stage mixed precision configuration.

Support was added for compiling on Jetson Ampere architecture. The release also fixes several compatibility issues, including the incorrect type for TensorRT workspace parameters in CAPI, missing LOD logic information after split operator refactoring, and a constant-folding pass bug that prevented conv2d weights from entering the TensorRT engine.