Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ See `src/torchada/_mapping.py` for the complete mapping table (380+ mappings).

```
# pyproject.toml or requirements.txt
torchada>=0.1.48
torchada>=0.1.49
```

### Step 2: Conditional Import
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ if torchada.is_gpu_device(device): # 在 CUDA 和 MUSA 上都能工作

```
# pyproject.toml 或 requirements.txt
torchada>=0.1.48
torchada>=0.1.49
```

### 步骤 2:条件导入
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_history.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Historical benchmark results for torchada performance tracking",
"results": [
{
"version": "0.1.48",
"version": "0.1.49",
"date": "2026-01-29",
"platform": "MUSA",
"pytorch_version": "2.7.1",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "torchada"
version = "0.1.48"
version = "0.1.49"
description = "Adapter package for torch_musa to act exactly like PyTorch CUDA"
readme = "README.md"
license = {text = "MIT"}
Expand Down
2 changes: 1 addition & 1 deletion src/torchada/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from torch.utils.cpp_extension import CUDAExtension, BuildExtension, CUDA_HOME
"""

__version__ = "0.1.48"
__version__ = "0.1.49"

from . import cuda, utils
from ._patch import apply_patches, get_original_init_process_group, is_patched
Expand Down
5 changes: 4 additions & 1 deletion src/torchada/utils/cpp_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,10 @@ def run(self):
if needs_porting:
source_dir = os.path.dirname(os.path.abspath(source))
dirs_to_port.add(source_dir)

# Sort directories by depth (deepest first) to ensure proper porting order
dirs_to_port = sorted(
dirs_to_port, key=lambda p: p.count("/"), reverse=True
)
# Port each unique directory
for cuda_dir in dirs_to_port:
self._port_directory(cuda_dir, mapping_rule)
Expand Down