Repository navigation
Hi all,
torch_musa 2.13.0.post1 is now available.
This release upgrades the torch_musa from PyTorch 2.11 to 2.13, maintains compatibility with MUSA SDK 5.1 and 5.2, extends versioned libtorch stable ABI coverage through PyTorch 2.13, and refreshes the allocator, graph, distributed, Inductor/AOTI, operator, and tensor interoperability layers.
The details are as follows:
-
Upgraded torch_musa to build against PyTorch v2.13.0 and changed the C++ build standard to C++20.
-
Added versioned libtorch stable ABI extension coverage for PyTorch 2.12 and 2.13, while retaining the existing 2.9–2.11 test paths.
-
Registered MUSA through
torch._register_device_moduleand enabled graph-safe RNG registration for the PrivateUse1 backend. -
Updated device capability APIs, including
get_arch_list, and aligned device registration and Dynamo tracing behavior with PyTorch 2.13. -
Added MUSA support for PyTorch
torch.acceleratorAPIs, including device capability reporting, stream capture, andaccelerator.Graphcapture/replay. -
Refreshed the MUSA caching allocator for PyTorch 2.13, including exact-address allocation, address-indexed block management, graph-capture reuse, and memory-pool handling.
-
Fixed expandable-segment IPC imports and added coverage for cross-process imported tensors.
-
Added a zero-copy FSDP bucket-layout planner to reduce unnecessary parameter and communication-buffer copies.
-
Extended symmetric-memory collectives with low-contention
all_gather_v_single, zero-CTA reduce-scatter modes, and in-place reduce-scatter support. -
Added configurable FSDP2 communication and overlap policies through
TORCH_MUSA_FSDP2_COMM_TYPEandTORCH_MUSA_FSDP2_OVERLAP_LEVEL, with expanded stream-topology and Llama-shaped training tests. -
Improved MUSA Inductor and AOTI integration by clearing MUSA graph trees during Dynamo reset, scaling the AOTI scratch workspace by grid size, and aligning device-stream and kernel-module handling with PyTorch 2.13.
-
Improved math SDPA behavior by upcasting inputs to float32 where required by the MUSA implementation.
-
Added double-precision support for selected binary, activation, clamp, and reduction operators.
-
Added boolean multiplication support through the MUSA multiplication stub and fixed pooling operator handling.
-
Added support for constructing MUSA tensors from
wp.arrayinputs and expanded tensor/NumPy interoperability tests.
Many thanks to the contributors from the open-source community for their merge requests. All submitted changes have been reviewed, tested, and merged.
Known && blocked issues
-
MUPTI upgrade requires Kineto to enbable the finalize API, and export TEARDOWN_MUPTI=1 manually. Testing revealed that kernel names may be reported out of order, so changes have not yet been integrated.
-
PyTorch 2.11's
intrusive_ptracquires the GIL when Python-wrapped Tensor/Storage references cross1 <-> 2, preserving object-lifetime correctness but turning cheap reference updates into synchronization points. This may delay kernel submission and reduce throughput. With DataLoadernum_workers > 1andpin_memory=True, thept_data_pinthread can intensify GIL contention. Reverting is unsafe; mitigations includenum_workers=0, lower prefetching, or main-thread pinning. -
Starting with this release, torch_musa requires the C++20 language standard. It shows that compilation errors occur with GCC >= 12.3. Until the toolchain compatibility issue is resolved, use GCC 11.4 as a temporary workaround.
Please feel free to contact us with any issues or questions.