PaddlePaddle

3.3.1 · active · verified Sat Apr 11

PaddlePaddle (PArallel Distributed Deep LEarning) is an efficient, flexible, and extensible deep learning framework. It is the first independent R&D deep learning platform in China, open-sourced since 2016, and is widely adopted across various industries including manufacturing, agriculture, and enterprise services. As of March 2026, the current stable version is 3.3.1. PaddlePaddle maintains regular updates for its core framework and offers monthly releases for its NVIDIA-optimized containers.

Warnings

Install

Imports

Quickstart

This quickstart code verifies the PaddlePaddle installation by running a built-in check. It then demonstrates basic tensor creation and a matrix multiplication operation, also indicating whether a GPU is detected and utilized.

import paddle

# Verify PaddlePaddle installation
print(f"PaddlePaddle installation check: {'Success!' if paddle.utils.run_check() else 'Failed.'}")

# Create a tensor
x = paddle.to_tensor([[1.0, 2.0], [3.0, 4.0]])
print(f"\nOriginal tensor:\n{x}")

# Perform a simple operation (e.g., matrix multiplication)
y = paddle.to_tensor([[5.0, 6.0], [7.0, 8.0]])
z = paddle.matmul(x, y)
print(f"Result of matrix multiplication:\n{z}")

# Check if GPU is available and currently used
if paddle.is_compiled_with_cuda():
    print(f"\nCUDA is available. Current device: {paddle.get_device()}")
else:
    print("\nCUDA is not available. Running on CPU.")

view raw JSON →