Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mx_driving

Overview

mx_driving is an operator and model acceleration library for autonomous driving, embodied intelligence VLA, and world models, developed on the Ascend NPU platform. It provides a suite of high-performance operators and model migration examples that support the PyTorch framework, enabling developers to leverage the powerful compute capabilities of Ascend AI Processors for autonomous driving workloads.

Ascend is a full-stack AI computing infrastructure for industry applications and services based on Huawei Ascend processors and software. For more information about Ascend, see Ascend Community.

Installation

From Binary

  1. Install PyTorch and torch-npu

Before installing mx_driving, complete the installation of PyTorch and torch-npu. For torch-npu installation, refer to torch-npu on PyPI.

# Install PyTorch
pip install torch==2.1.0

# Install torch-npu
pip install torch-npu==2.1.0
  1. Install mx_driving

mx_driving provides two PyPI packages based on hardware platform:

PyPI Package Hardware Install Command
mx-driving Atlas A2 (default) pip install mx-driving
mx-driving-a5 Atlas A5 pip install mx-driving-a5

Both packages provide the same import mx_driving interface. Choose based on your hardware:

# For Atlas A2 (default, most users)
pip install mx-driving

# For Atlas A5
pip install mx-driving-a5

If you need a specific PyTorch version:

# Atlas A2 + PyTorch 2.1.x (this version)
pip install mx-driving==26.2.0rc1.post1

# Atlas A2 + PyTorch 2.6.x/2.7.x/2.8.x
pip install mx-driving==26.2.0rc1.post2

# Atlas A5 + PyTorch 2.6.x/2.7.x/2.8.x
pip install mx-driving-a5==26.2.0rc1.post2

Note: mx-driving and mx-driving-a5 cannot be installed simultaneously since both provide the mx_driving Python package.

From Source

For source compilation, refer to Deploying Driving SDK Environment.

Getting Started

Prerequisites

Initialize the CANN environment variable:

source /usr/local/Ascend/ascend-toolkit/set_env.sh

Quick Verification

You can quickly verify the installation with a simple example using the scatter_max operator:

import torch
import torch_npu
from mx_driving import scatter_max

updates = torch.tensor([[2, 0, 1, 3, 1, 0, 0, 4],
                        [0, 2, 1, 3, 0, 3, 4, 2],
                        [1, 2, 3, 4, 4, 3, 2, 1]], dtype=torch.float32).npu()
indices = torch.tensor([0, 2, 0], dtype=torch.int32).npu()
out = updates.new_zeros((3, 8))
out, argmax = scatter_max(updates, indices, out)
print(out)
print(argmax)

One-Click Patcher

mx_driving provides a one-click Patcher mechanism that automatically replaces GPU-based implementations with NPU-optimized implementations, enabling seamless model migration from GPU to Ascend NPU:

from mx_driving import patcher
patcher.patch_all()

For more details, refer to One-Click Patcher.

High-Performance API

mx_driving provides various categories of high-performance operators optimized for Ascend NPU:

Category Operators
General scatter_max, scatter_mean, scatter_add, knn, furthest_point_sampling, group_points, unique_voxel, graph_softmax, ...
Sampling bev_pool_v1, bev_pool_v2, bev_pool_v3, npu_voxel_pooling_train, roiaware_pool3d, border_align, ...
Voxelization voxelization, dynamic_scatter
Detection nms3d, boxes_iou_bev, box_iou_quadri, diff_iou_rotated_2d, points_in_boxes_all, ...
Sparse SparseConv3d, SubMConv3d, SparseInverseConv3d
Fusion multi_scale_deformable_attn, deformable_aggregation, npu_add_relu, npu_fused_bias_leaky_relu, npu_batch_matmul, ...

For the complete API list, refer to API Reference.

Supported Models

mx_driving provides migration and optimization examples for autonomous driving models on Ascend servers, including perception, planning, end-to-end, and VLA models:

  • BEVFusion — Multi-task multi-sensor fusion framework
  • BEVFormer — Bird's-eye-view perception from camera images
  • Sparse4D — Sparse 4D perception framework
  • And more...

For the full model list, refer to Model Support List.

PyTorch and Python Version Compatibility

mx-driving (Atlas A2)

Version CPU Architecture Python Version PyTorch Version torch_npu Version
26.2.0rc1.post1 x86 & aarch64 3.8, 3.9, 3.10, 3.11 2.1.0 v2.1.0-26.2.0rc1
26.2.0rc1.post2 x86 & aarch64 3.9, 3.10, 3.11 2.6.0/2.7.1/2.8.0 v2.7.1-26.2.0rc1

mx-driving-a5 (Atlas A5)

Version CPU Architecture Python Version PyTorch Version torch_npu Version
26.2.0rc1.post2 x86 & aarch64 3.9, 3.10, 3.11 2.6.0/2.7.1/2.8.0 v2.7.1-26.2.0rc1

Hardware Support

Product Series Product Model
Atlas A2 Training Series Atlas 800T A2, Atlas 900 A2 PoD, Atlas 200T A2 Box16, Atlas 300T A2
Atlas A3 Training Series Atlas 800T A3, Atlas 900 A3 SuperPoD

Branch Maintenance Policies

Status Duration Description
Planning 1-3 months Plan features
Development 3 months Develop features
Maintained 6-12 months Incorporate resolved issues and release versions. Regular versions: 6 months; Long-term support versions: 12 months
Unmaintained 0-3 months Incorporate resolved issues, no dedicated maintainers, no releases
End Of Life (EOL) N/A No longer accept any modifications

Version Maintenance

Version Maintenance Policy Status Release Date Subsequent Status EOL Date
v26.2.0rc1 Regular Release Maintained
v26.0.0 Regular Release Maintained 2026/03/30 Expected unmaintained from 2026/09/30
v7.3.0 Regular Release Maintained 2025/12/30 Expected unmaintained from 2026/06/30
v7.2.RC1 Regular Release Maintained 2025/09/30 Unmaintained from 2026/03/30
v7.1.RC1 Regular Release Unmaintained 2025/06/30 Unmaintained from 2025/12/30

Suggestions and Communication

If you have any questions or suggestions, you can submit Issues. We will reply as soon as possible.

License

  • Driving SDK is licensed under the Apache-2.0 License.
  • Documentation under the docs directory is licensed under CC-BY 4.0.

Contributing

Before contributing, please sign the Open Source Contributor License Agreement (CLA).

If you encounter a bug, please submit an issue.

If you plan to contribute bug fixes, please submit Pull Requests. See contribution guidelines for details.

If you plan to contribute new features, please create an issue for discussion first.

Metadata

Release files for mx-driving 26.2.0rc1.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for mx-driving 26.2.0rc1.post1
File Actions
mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_x86_64.whl
mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details for mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_aarch64.whl
mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_x86_64.whl
mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details for mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_aarch64.whl
mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_x86_64.whl
mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details for mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_aarch64.whl
mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_x86_64.whl
mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details for mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_aarch64.whl

Total release size: 61.5 MB

Release files / mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_x86_64.whl

Download URL mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_x86_64.whl
Size 7.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1256df406aa30e9b5e6576cc4c44576ff5daaa8d132d7ba5097e999881c0c1ba
BLAKE2b-256 checksum
How to use checksums
3ae2c2438ad351fc4f8e99402c1e3dd0356de04ed00555218d475abb7ba4eef9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_aarch64.whl

Download URL mx_driving-26.2.0rc1.post1-cp311-cp311-manylinux2014_aarch64.whl
Size 7.5 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
350d6ece62c961a8f008fbd3f5f6e3a5383d523baee47ef9e5bab41ce6ed8a3d
BLAKE2b-256 checksum
How to use checksums
6548702a13241151154bc3cef8f9463c48c20d68aafc59bcc6ad9a3d87682e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_x86_64.whl

Download URL mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_x86_64.whl
Size 7.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a72e8f9b0b7ee5a933525d6fde11d83e1eb954e4a984f8554ca37eafd5c795d4
BLAKE2b-256 checksum
How to use checksums
bc9c8e0433c4f09f2706f48d7653460f4f8e293868ca3d5c9bba69d4c585154a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_aarch64.whl

Download URL mx_driving-26.2.0rc1.post1-cp310-cp310-manylinux2014_aarch64.whl
Size 7.5 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
c1b421a6c61285b0958c9e4cb07845546952e16c3eb9a35eca5dd5cb9657eb4c
BLAKE2b-256 checksum
How to use checksums
a2c53df9d8fcd75efeaba32006cd2d30c42904659aa11497eb200700131605e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_x86_64.whl

Download URL mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_x86_64.whl
Size 7.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9ec0a9f813f9fe180dc19e838143ed12a1f670fc4bc1711a6fa9e260c5c4d66a
BLAKE2b-256 checksum
How to use checksums
39e951f550b852562f3af79186bab2c821651401a522b327d47f449abfc9e971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_aarch64.whl

Download URL mx_driving-26.2.0rc1.post1-cp39-cp39-manylinux2014_aarch64.whl
Size 7.5 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
0bac1ee50e7e972e98af2133387bce223cc1628a8239b16e26efa69af7f63375
BLAKE2b-256 checksum
How to use checksums
806ee6fc3fc9661f0a429447531dc979321d627049cf5e95c85275b3a83f7fb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_x86_64.whl

Download URL mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_x86_64.whl
Size 7.9 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f8fcd094b9923d7875f2e0b3116c2d68cd70068a1c798c8c2b08db6940665aff
BLAKE2b-256 checksum
How to use checksums
6b53013c4fea3931933764537ef498838ac206958bdc171abcf819cda9176022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_aarch64.whl

Download URL mx_driving-26.2.0rc1.post1-cp38-cp38-manylinux2014_aarch64.whl
Size 7.5 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
c9a3d5edf242fd7cfc1495197afe6a03408af852af15872d8b57f1d986e24b51
BLAKE2b-256 checksum
How to use checksums
def3c9c69a23d55b6e42fd70d09b8238d3b5a67a1adee8ae2048478171ac3cd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for mx-driving 26.2.0rc1.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page