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 @@ -392,7 +392,7 @@ See `src/torchada/_mappings/` for 400+ mapping rules grouped by API domain.

```
# pyproject.toml or requirements.txt
torchada>=0.1.85
torchada>=0.1.86
```

### 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 @@ -376,7 +376,7 @@ if torchada.is_gpu_device(device): # 在 CUDA 和 MUSA 上都能工作

```
# pyproject.toml 或 requirements.txt
torchada>=0.1.85
torchada>=0.1.86
```

### 步骤 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.85",
"version": "0.1.86",
"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.85"
version = "0.1.86"
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.85"
__version__ = "0.1.86"

from . import cuda, utils

Expand Down
1 change: 1 addition & 0 deletions src/torchada/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@ class _CudaModuleWrapper(ModuleType):
_SPECIAL_ATTRS = {
"StreamContext": "core.stream.StreamContext",
"streams": "core.stream",
"_get_device_index": "core._utils._get_musa_device_index",
}

# Attribute name remappings (CUDA name -> MUSA name)
Expand Down
11 changes: 11 additions & 0 deletions tests/test_cuda_patching.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,17 @@ def test_streams_module(self):
assert sys.modules["torch.cuda.streams"] is torch_musa.core.stream
assert torch.cuda.streams.Stream is torch_musa.core.stream.Stream

def test_get_device_index_helper(self):
"""Test the private CUDA device helper used by PyTorch Dynamo."""
import torch

import torchada

if torchada.is_musa_platform():
from torch_musa.core._utils import _get_musa_device_index

assert torch.cuda._get_device_index is _get_musa_device_index

def test_stream_cuda_stream_property(self):
"""Test stream.cuda_stream returns same value as stream.musa_stream on MUSA."""
import torch
Expand Down
2 changes: 1 addition & 1 deletion tests/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_get_version(self):

version = torchada.get_version()
assert version == torchada.__version__
assert version == "0.1.85"
assert version == "0.1.86"
assert isinstance(version, str)

def test_project_version_matches_runtime_version(self):
Expand Down