Skip to content

torch_musa Release 2.13.0.post1

Latest

Choose a tag to compare

@lijing-mt lijing-mt released this 26 Nov 12:22
· 10 commits to main since this release
e0cc0ee

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_module and 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.accelerator APIs, including device capability reporting, stream capture, and accelerator.Graph capture/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_TYPE and TORCH_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.array inputs 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_ptr acquires the GIL when Python-wrapped Tensor/Storage references cross 1 <-> 2, preserving object-lifetime correctness but turning cheap reference updates into synchronization points. This may delay kernel submission and reduce throughput. With DataLoader num_workers > 1 and pin_memory=True, the pt_data_pin thread can intensify GIL contention. Reverting is unsafe; mitigations include num_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.