tilelang-rocm 0.1.4.post4__cp310-cp310-manylinux1_x86_64.whl → 0.1.4.post5__cp310-cp310-manylinux1_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
tilelang/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4.post4
1
+ 0.1.4.post5
tilelang/__init__.py CHANGED
@@ -4,6 +4,7 @@
4
4
  import sys
5
5
  import os
6
6
  import ctypes
7
+ import subprocess
7
8
 
8
9
  import logging
9
10
  from tqdm import tqdm
@@ -76,6 +77,67 @@ def _load_tile_lang_lib():
76
77
  lib_path = libinfo.find_lib_path(lib_name, optional=False)
77
78
  return ctypes.CDLL(lib_path[0]), lib_path[0]
78
79
 
80
+ def check_and_install_rocm_torch():
81
+ """检查并自动安装ROCm PyTorch"""
82
+ try:
83
+ # 检查torch是否已安装且为ROCm版本
84
+ import torch
85
+ if hasattr(torch.version, 'hip') and torch.version.hip:
86
+ print(f"ROCm PyTorch {torch.version.__version__} is already installed")
87
+ return True
88
+ except ImportError:
89
+ pass
90
+
91
+ print("ROCm PyTorch not found. Installing...")
92
+ install_rocm_torch()
93
+
94
+ # 强制重新加载torch模块
95
+ if 'torch' in sys.modules:
96
+ del sys.modules['torch']
97
+
98
+ try:
99
+ import torch
100
+ print(f"Successfully installed ROCm PyTorch {torch.version.__version__}")
101
+ return True
102
+ except ImportError:
103
+ print("Failed to import torch after installation")
104
+ return False
105
+
106
+ def install_rocm_torch():
107
+ """安装ROCm PyTorch"""
108
+ print("Installing ROCm PyTorch components...")
109
+
110
+ wheels = [
111
+ "https://repo.radeon.com/rocm/manylinux/rocm-rel-6.3.4/torch-2.4.0%2Brocm6.3.4.git7cecbf6d-cp310-cp310-linux_x86_64.whl",
112
+ "https://repo.radeon.com/rocm/manylinux/rocm-rel-6.3.4/torchvision-0.19.0%2Brocm6.3.4.gitfab84886-cp310-cp310-linux_x86_64.whl",
113
+ "https://repo.radeon.com/rocm/manylinux/rocm-rel-6.3.4/pytorch_triton_rocm-3.0.0%2Brocm6.3.4.git75cc27c2-cp310-cp310-linux_x86_64.whl",
114
+ "https://repo.radeon.com/rocm/manylinux/rocm-rel-6.3.4/torchaudio-2.4.0%2Brocm6.3.4.git69d40773-cp310-cp310-linux_x86_64.whl"
115
+ ]
116
+
117
+ # 卸载现有的torch相关包
118
+ print("Uninstalling existing PyTorch...")
119
+ try:
120
+ subprocess.run([sys.executable, "-m", "pip", "uninstall",
121
+ "torch", "torchvision", "pytorch-triton-rocm", "torchaudio", "-y"],
122
+ capture_output=True)
123
+ except subprocess.CalledProcessError:
124
+ print("No existing PyTorch installation found")
125
+
126
+ # 安装ROCm版本
127
+ print("Downloading and installing ROCm PyTorch...")
128
+ subprocess.run([sys.executable, "-m", "pip", "install"] + wheels, check=True)
129
+
130
+ # 在模块导入时自动检查并安装
131
+ _rocm_torch_checked = False
132
+
133
+ def ensure_rocm_torch():
134
+ global _rocm_torch_checked
135
+ if not _rocm_torch_checked:
136
+ check_and_install_rocm_torch()
137
+ _rocm_torch_checked = True
138
+
139
+ # 在模块导入时立即检查
140
+ ensure_rocm_torch()
79
141
 
80
142
  # only load once here
81
143
  if SKIP_LOADING_TILELANG_SO == "0":
Binary file
Binary file
tilelang/lib/libtvm.so CHANGED
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tilelang-rocm
3
- Version: 0.1.4.post4
3
+ Version: 0.1.4.post5
4
4
  Summary: A tile level programming language to generate high performance code.
5
5
  Home-page: https://github.com/tile-ai/tilelang
6
6
  Author: Microsoft Research
@@ -1,8 +1,8 @@
1
1
  tilelang/CMakeLists.txt,sha256=xJhnusYZI4UhD_fzseGH3Tn2BeovUzz3aWUwPq-WU0Y,7010
2
2
  tilelang/LICENSE,sha256=v9fVeAgRKQXc5ySwTns767gj0-dHN9XYPpGURkAVAXs,1127
3
3
  tilelang/README.md,sha256=bk1No4TTq4QGnHFvCryFAV2ZkqizZZy-4qSMwfAgM-4,11911
4
- tilelang/VERSION,sha256=WVgIvJCERXBRt77au2fBkozvMuBc6pwDsPZyewlakhw,12
5
- tilelang/__init__.py,sha256=IS1RDxLiuQkqvtMzTm73d2se5Fa_ryYeMr9YxtrWhCU,3159
4
+ tilelang/VERSION,sha256=Z_-tN0NhQNsklCicBtnNgmKd2vtDbgzBQbNqXG__Rn0,12
5
+ tilelang/__init__.py,sha256=uCqLGeGMgs0ik-NxKq5S-xC__caiMXzKTVFbsvQLKcM,5503
6
6
  tilelang/_ffi_api.py,sha256=D-HfDxx8EZq6qItftg-ejOhpC_smIZLN-pWPVCNX_UM,243
7
7
  tilelang/config.cmake,sha256=370i6N3wwi7-LPGZDBtiiu54UWp39ndD-9lCurLhHwI,14330
8
8
  tilelang/env.py,sha256=naNDQ5Icc7wx09-TtK4bC416IZd4NK4QEFvE1JdfPSA,8391
@@ -7326,10 +7326,10 @@ tilelang/layout/__init__.py,sha256=F1wr9yBG9GW84h8KWXz-hRJFfqyZuY0EKSrG08KyrWQ,2
7326
7326
  tilelang/layout/fragment.py,sha256=zTv9P96lsYi9BWc5pxR4PA2Z5RSDGP7D5uJCiNw7_oc,8445
7327
7327
  tilelang/layout/layout.py,sha256=20CWxz_S8k_WNvWiR4gdIrEsQ36e5bsnOEqmu4zGk_c,4311
7328
7328
  tilelang/layout/swizzle.py,sha256=PMqu_s1sNCh9uo8eDs5qmLKXnDqZwv34GT3H9D4YDO0,438
7329
- tilelang/lib/libtilelang.so,sha256=bkRIVkuti7c91AYraa4qCDQSP2cPzb2oc3TNOZ2fvww,4760416
7330
- tilelang/lib/libtilelang_module.so,sha256=tFH0b1ay8k5BxLvBlPNpJbyNXIGnbaRVOHRGIq7s0es,4760416
7331
- tilelang/lib/libtvm.so,sha256=DqL8HQezwF2SLmeQvoQuQ51o7E7_0EBg2P-lbmTf6DU,80820960
7332
- tilelang/lib/libtvm_runtime.so,sha256=U7r_vMlPJIYT120_w2KtJg5-X4xYXdcaK3Ck1-WV1kk,4759920
7329
+ tilelang/lib/libtilelang.so,sha256=Pv-058HPWNR37AMY1uyTk7oKItNvmYY3Lm4cWE84a6s,4760416
7330
+ tilelang/lib/libtilelang_module.so,sha256=_S-AaWcyKqQJYYhLhKO5riz83PsDIGXHYG4mAKrO2XA,4760416
7331
+ tilelang/lib/libtvm.so,sha256=Pfs0fV-CUGps28TWQXQaqwUKTmB8Zk10ix1BcG_i7js,80820960
7332
+ tilelang/lib/libtvm_runtime.so,sha256=QOK7ropRHXIxXxwoHzJT85Qw76c28F8yJpizx1XVK8I,4759920
7333
7333
  tilelang/math/__init__.py,sha256=JC4fqrU_LV_wDErti-wHNr4j6_mqP1PsK0qqkhaSzRU,209
7334
7334
  tilelang/primitives/__init__.py,sha256=10gQN3QWUFM1nkGXY46QFcWUXxwsKMsVn23JdyFHil4,167
7335
7335
  tilelang/primitives/gemm/__init__.py,sha256=j62ObmbL5Q6m3lSouNBQDk1hZZRnSp4UNNCCaSlKYXU,1658
@@ -7375,8 +7375,8 @@ tilelang/utils/deprecated.py,sha256=CiZ9y_76_dZ24SFDdasDiLmibwi6xO2Gdj6WzTWU0Qg,
7375
7375
  tilelang/utils/language.py,sha256=KUzUZ8Z2x1np0Hu_MrjWOIcRrVAZHX90li1Xw9fYZXY,3291
7376
7376
  tilelang/utils/target.py,sha256=P-74pdCLWcp2MZMQUoPIFwKF1NZ1QT-L0VroIL8m2to,2486
7377
7377
  tilelang/utils/tensor.py,sha256=8ZnSw8E8cBesbVI71iEQWmVHIFUwcf6GyjblluX2C4c,12523
7378
- tilelang_rocm-0.1.4.post4.dist-info/licenses/LICENSE,sha256=v9fVeAgRKQXc5ySwTns767gj0-dHN9XYPpGURkAVAXs,1127
7379
- tilelang_rocm-0.1.4.post4.dist-info/METADATA,sha256=AQV52vbAcmP0exrGveVIFcPJ6-sHomU1H_9yPI0bGjI,13062
7380
- tilelang_rocm-0.1.4.post4.dist-info/WHEEL,sha256=tjHrT7-JLZ0qMFFxr_WeEipEQugV2Q-OnKugRM4coRw,104
7381
- tilelang_rocm-0.1.4.post4.dist-info/top_level.txt,sha256=qvMq-AYkDVggI-9VIAzCe5CXHl66IEWj7J29-JbuFsI,21
7382
- tilelang_rocm-0.1.4.post4.dist-info/RECORD,,
7378
+ tilelang_rocm-0.1.4.post5.dist-info/licenses/LICENSE,sha256=v9fVeAgRKQXc5ySwTns767gj0-dHN9XYPpGURkAVAXs,1127
7379
+ tilelang_rocm-0.1.4.post5.dist-info/METADATA,sha256=uwPUMUQofy-72iLum1mjIBSaDJhEfZkUmiKFTcdM5yA,13062
7380
+ tilelang_rocm-0.1.4.post5.dist-info/WHEEL,sha256=tjHrT7-JLZ0qMFFxr_WeEipEQugV2Q-OnKugRM4coRw,104
7381
+ tilelang_rocm-0.1.4.post5.dist-info/top_level.txt,sha256=qvMq-AYkDVggI-9VIAzCe5CXHl66IEWj7J29-JbuFsI,21
7382
+ tilelang_rocm-0.1.4.post5.dist-info/RECORD,,