triton-windows 3.2.0.post17__cp312-cp312-win_amd64.whl → 3.2.0.post18__cp312-cp312-win_amd64.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.
Potentially problematic release.
This version of triton-windows might be problematic. Click here for more details.
- triton/_C/libtriton.pyd +0 -0
- triton/backends/nvidia/compiler.py +3 -1
- triton/backends/nvidia/driver.py +4 -0
- triton/runtime/build.py +15 -4
- triton/tools/compile.c +1 -0
- triton/windows_utils.py +96 -35
- {triton_windows-3.2.0.post17.dist-info → triton_windows-3.2.0.post18.dist-info}/METADATA +1 -1
- {triton_windows-3.2.0.post17.dist-info → triton_windows-3.2.0.post18.dist-info}/RECORD +10 -10
- {triton_windows-3.2.0.post17.dist-info → triton_windows-3.2.0.post18.dist-info}/WHEEL +1 -1
- {triton_windows-3.2.0.post17.dist-info → triton_windows-3.2.0.post18.dist-info}/top_level.txt +0 -0
triton/_C/libtriton.pyd
CHANGED
|
Binary file
|
|
@@ -372,7 +372,9 @@ class CUDABackend(BaseBackend):
|
|
|
372
372
|
ptxas, *line_info, *fmad, '-v', *opt_level, f'--gpu-name=sm_{capability}{suffix}', fsrc.name, '-o', fbin
|
|
373
373
|
]
|
|
374
374
|
try:
|
|
375
|
-
|
|
375
|
+
# close_fds=True on Windows and False on Linux, see https://github.com/triton-lang/triton/pull/4357
|
|
376
|
+
# On Windows, both stdout and stderr need to be redirected to flog
|
|
377
|
+
subprocess.run(ptxas_cmd, check=True, close_fds=True if os.name == 'nt' else False, stdout=flog, stderr=flog)
|
|
376
378
|
except subprocess.CalledProcessError as e:
|
|
377
379
|
with open(flog.name) as log_file:
|
|
378
380
|
log = log_file.read()
|
triton/backends/nvidia/driver.py
CHANGED
|
@@ -69,6 +69,10 @@ def compile_module_from_src(src, name):
|
|
|
69
69
|
so = _build(name, src_path, tmpdir, library_dirs(), include_dir, libraries)
|
|
70
70
|
with open(so, "rb") as f:
|
|
71
71
|
cache_path = cache.put(f.read(), so_name, binary=True)
|
|
72
|
+
|
|
73
|
+
# Loading module with relative path may cause error
|
|
74
|
+
cache_path = os.path.abspath(cache_path)
|
|
75
|
+
|
|
72
76
|
import importlib.util
|
|
73
77
|
spec = importlib.util.spec_from_file_location(name, cache_path)
|
|
74
78
|
mod = importlib.util.module_from_spec(spec)
|
triton/runtime/build.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import contextlib
|
|
2
|
+
import functools
|
|
2
3
|
import sys
|
|
3
4
|
import io
|
|
4
5
|
import sysconfig
|
|
@@ -21,8 +22,12 @@ def quiet():
|
|
|
21
22
|
sys.stdout, sys.stderr = old_stdout, old_stderr
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
@functools.cache
|
|
24
26
|
def get_cc():
|
|
25
27
|
cc = os.environ.get("CC")
|
|
28
|
+
if cc is None:
|
|
29
|
+
# Find and check MSVC and Windows SDK from environment variables set by Launch-VsDevShell.ps1 or VsDevCmd.bat
|
|
30
|
+
cc, _, _ = find_msvc_winsdk(env_only=True)
|
|
26
31
|
if cc is None:
|
|
27
32
|
# Bundled TinyCC
|
|
28
33
|
cc = os.path.join(sysconfig.get_paths()["platlib"], "triton", "runtime", "tcc", "tcc.exe")
|
|
@@ -89,13 +94,19 @@ def _build(name, src, srcdir, library_dirs, include_dirs, libraries):
|
|
|
89
94
|
if "python3" not in libraries:
|
|
90
95
|
libraries += ["python3"]
|
|
91
96
|
if is_msvc(cc):
|
|
92
|
-
msvc_winsdk_inc_dirs, msvc_winsdk_lib_dirs = find_msvc_winsdk()
|
|
97
|
+
_, msvc_winsdk_inc_dirs, msvc_winsdk_lib_dirs = find_msvc_winsdk()
|
|
93
98
|
include_dirs += msvc_winsdk_inc_dirs
|
|
94
99
|
library_dirs += msvc_winsdk_lib_dirs
|
|
95
100
|
cc_cmd = _cc_cmd(cc, src, so, include_dirs, library_dirs, libraries)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
|
|
102
|
+
try:
|
|
103
|
+
ret = subprocess.check_call(cc_cmd)
|
|
104
|
+
if ret == 0:
|
|
105
|
+
return so
|
|
106
|
+
except Exception as e:
|
|
107
|
+
print("Failed to compile. cc_cmd:", cc_cmd)
|
|
108
|
+
raise e
|
|
109
|
+
|
|
99
110
|
# fallback on setuptools
|
|
100
111
|
extra_compile_args = []
|
|
101
112
|
if is_msvc(cc):
|
triton/tools/compile.c
CHANGED
triton/windows_utils.py
CHANGED
|
@@ -57,12 +57,31 @@ def check_msvc(msvc_base_path: Path, version: str) -> bool:
|
|
|
57
57
|
return all(
|
|
58
58
|
x.exists()
|
|
59
59
|
for x in [
|
|
60
|
+
msvc_base_path / version / "bin" / "Hostx64" / "x64" / "cl.exe",
|
|
60
61
|
msvc_base_path / version / "include" / "vcruntime.h",
|
|
61
62
|
msvc_base_path / version / "lib" / "x64" / "vcruntime.lib",
|
|
62
63
|
]
|
|
63
64
|
)
|
|
64
65
|
|
|
65
66
|
|
|
67
|
+
def find_msvc_env() -> tuple[Optional[Path], Optional[str]]:
|
|
68
|
+
msvc_base_path = os.getenv("VCINSTALLDIR")
|
|
69
|
+
if msvc_base_path is None:
|
|
70
|
+
return None, None
|
|
71
|
+
msvc_base_path = Path(msvc_base_path) / "Tools" / "MSVC"
|
|
72
|
+
|
|
73
|
+
version = os.getenv("VCToolsVersion")
|
|
74
|
+
if not check_msvc(msvc_base_path, version):
|
|
75
|
+
warnings.warn(
|
|
76
|
+
f"Environment variables VCINSTALLDIR = {os.getenv('VCINSTALLDIR')}, "
|
|
77
|
+
f"VCToolsVersion = {os.getenv('VCToolsVersion')} are set, "
|
|
78
|
+
"but this MSVC installation is incomplete."
|
|
79
|
+
)
|
|
80
|
+
return None, None
|
|
81
|
+
|
|
82
|
+
return msvc_base_path, version
|
|
83
|
+
|
|
84
|
+
|
|
66
85
|
def find_msvc_vswhere() -> tuple[Optional[Path], Optional[str]]:
|
|
67
86
|
vswhere_path = find_in_program_files(
|
|
68
87
|
r"Microsoft Visual Studio\Installer\vswhere.exe"
|
|
@@ -144,20 +163,28 @@ def find_msvc_hardcoded() -> tuple[Optional[Path], Optional[str]]:
|
|
|
144
163
|
return None, None
|
|
145
164
|
|
|
146
165
|
|
|
147
|
-
def find_msvc() -> tuple[list[str], list[str]]:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
166
|
+
def find_msvc(env_only: bool) -> tuple[Optional[str], list[str], list[str]]:
|
|
167
|
+
if env_only:
|
|
168
|
+
fs = [find_msvc_env]
|
|
169
|
+
else:
|
|
170
|
+
fs = [
|
|
171
|
+
find_msvc_env,
|
|
172
|
+
find_msvc_vswhere,
|
|
173
|
+
find_msvc_envpath,
|
|
174
|
+
find_msvc_hardcoded,
|
|
175
|
+
]
|
|
176
|
+
for f in fs:
|
|
177
|
+
msvc_base_path, version = f()
|
|
178
|
+
if msvc_base_path:
|
|
179
|
+
return (
|
|
180
|
+
str(msvc_base_path / version / "bin" / "Hostx64" / "x64" / "cl.exe"),
|
|
181
|
+
[str(msvc_base_path / version / "include")],
|
|
182
|
+
[str(msvc_base_path / version / "lib" / "x64")],
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
if not env_only:
|
|
154
186
|
warnings.warn("Failed to find MSVC.")
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return (
|
|
158
|
-
[str(msvc_base_path / version / "include")],
|
|
159
|
-
[str(msvc_base_path / version / "lib" / "x64")],
|
|
160
|
-
)
|
|
187
|
+
return None, [], []
|
|
161
188
|
|
|
162
189
|
|
|
163
190
|
def check_winsdk(winsdk_base_path: Path, version: str) -> bool:
|
|
@@ -170,6 +197,26 @@ def check_winsdk(winsdk_base_path: Path, version: str) -> bool:
|
|
|
170
197
|
)
|
|
171
198
|
|
|
172
199
|
|
|
200
|
+
def find_winsdk_env() -> tuple[Optional[Path], Optional[str]]:
|
|
201
|
+
winsdk_base_path = os.getenv("WindowsSdkDir")
|
|
202
|
+
if winsdk_base_path is None:
|
|
203
|
+
return None, None
|
|
204
|
+
winsdk_base_path = Path(winsdk_base_path)
|
|
205
|
+
|
|
206
|
+
version = os.getenv("WindowsSDKVersion")
|
|
207
|
+
if version:
|
|
208
|
+
version = version.rstrip("\\")
|
|
209
|
+
if not check_winsdk(winsdk_base_path, version):
|
|
210
|
+
warnings.warn(
|
|
211
|
+
f"Environment variables WindowsSdkDir = {os.getenv('WindowsSdkDir')}, "
|
|
212
|
+
f"WindowsSDKVersion = {os.getenv('WindowsSDKVersion')} are set, "
|
|
213
|
+
"but this Windows SDK installation is incomplete."
|
|
214
|
+
)
|
|
215
|
+
return None, None
|
|
216
|
+
|
|
217
|
+
return winsdk_base_path, version
|
|
218
|
+
|
|
219
|
+
|
|
173
220
|
def find_winsdk_registry() -> tuple[Optional[Path], Optional[str]]:
|
|
174
221
|
try:
|
|
175
222
|
reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
|
|
@@ -212,32 +259,46 @@ def find_winsdk_hardcoded() -> tuple[Optional[Path], Optional[str]]:
|
|
|
212
259
|
return winsdk_base_path, version
|
|
213
260
|
|
|
214
261
|
|
|
215
|
-
def find_winsdk() -> tuple[list[str], list[str]]:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
262
|
+
def find_winsdk(env_only: bool) -> tuple[list[str], list[str]]:
|
|
263
|
+
if env_only:
|
|
264
|
+
fs = [find_winsdk_env]
|
|
265
|
+
else:
|
|
266
|
+
fs = [
|
|
267
|
+
find_winsdk_env,
|
|
268
|
+
find_winsdk_registry,
|
|
269
|
+
find_winsdk_hardcoded,
|
|
270
|
+
]
|
|
271
|
+
for f in fs:
|
|
272
|
+
winsdk_base_path, version = f()
|
|
273
|
+
if winsdk_base_path:
|
|
274
|
+
return (
|
|
275
|
+
[
|
|
276
|
+
str(winsdk_base_path / "Include" / version / "shared"),
|
|
277
|
+
str(winsdk_base_path / "Include" / version / "ucrt"),
|
|
278
|
+
str(winsdk_base_path / "Include" / version / "um"),
|
|
279
|
+
],
|
|
280
|
+
[
|
|
281
|
+
str(winsdk_base_path / "Lib" / version / "ucrt" / "x64"),
|
|
282
|
+
str(winsdk_base_path / "Lib" / version / "um" / "x64"),
|
|
283
|
+
],
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
if not env_only:
|
|
220
287
|
warnings.warn("Failed to find Windows SDK.")
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return (
|
|
224
|
-
[
|
|
225
|
-
str(winsdk_base_path / "Include" / version / "shared"),
|
|
226
|
-
str(winsdk_base_path / "Include" / version / "ucrt"),
|
|
227
|
-
str(winsdk_base_path / "Include" / version / "um"),
|
|
228
|
-
],
|
|
229
|
-
[
|
|
230
|
-
str(winsdk_base_path / "Lib" / version / "ucrt" / "x64"),
|
|
231
|
-
str(winsdk_base_path / "Lib" / version / "um" / "x64"),
|
|
232
|
-
],
|
|
233
|
-
)
|
|
288
|
+
return [], []
|
|
234
289
|
|
|
235
290
|
|
|
236
291
|
@functools.cache
|
|
237
|
-
def find_msvc_winsdk(
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
292
|
+
def find_msvc_winsdk(
|
|
293
|
+
env_only: bool = False,
|
|
294
|
+
) -> tuple[Optional[str], list[str], list[str]]:
|
|
295
|
+
msvc_bin_path, msvc_inc_dirs, msvc_lib_dirs = find_msvc(env_only)
|
|
296
|
+
winsdk_inc_dirs, winsdk_lib_dirs = find_winsdk(env_only)
|
|
297
|
+
return (
|
|
298
|
+
msvc_bin_path,
|
|
299
|
+
msvc_inc_dirs + winsdk_inc_dirs,
|
|
300
|
+
msvc_lib_dirs + winsdk_lib_dirs,
|
|
301
|
+
)
|
|
241
302
|
|
|
242
303
|
|
|
243
304
|
@functools.cache
|
|
@@ -2,8 +2,8 @@ triton/__init__.py,sha256=buC26NIOMT6cwmoYkc5jk46jb3fploY6_bOZYKwzdKQ,1347
|
|
|
2
2
|
triton/_internal_testing.py,sha256=4pzyc_36u05khUveZ1TWL3MQ-7EVMJ1C2c1dRd8BMsw,4269
|
|
3
3
|
triton/errors.py,sha256=8WfnuRKLG578mgY6cBA3ECruVMf9ULEKFNgRcJ6IhWM,89
|
|
4
4
|
triton/testing.py,sha256=fX3pn9bjC3Z-z5qzSKW56C_2WF8h3mHLy5RJqpZ-HsA,19382
|
|
5
|
-
triton/windows_utils.py,sha256=
|
|
6
|
-
triton/_C/libtriton.pyd,sha256=
|
|
5
|
+
triton/windows_utils.py,sha256=YUl-1QbLINQRaAAMNYPjLiTFZlVsCNi9mTFck5aemwk,12778
|
|
6
|
+
triton/_C/libtriton.pyd,sha256=ZesLdcWMEpclb3Z5E1TkoFpCx94VAydMNNx5jP6qYPI,87260672
|
|
7
7
|
triton/backends/__init__.py,sha256=opAo_vgEMt3tLO_bYFrYGksnIu0qohbmyuu_s3-rNAs,1595
|
|
8
8
|
triton/backends/compiler.py,sha256=JZiiEbB9Wws3tjU6KXrydKtlOQI7Suk-mTYPlafa0Qk,11388
|
|
9
9
|
triton/backends/driver.py,sha256=QX_6P1Go9ajdlHZi4Hv3nCtdHyDA6o8_lM3NMnlH1mk,1386
|
|
@@ -105,9 +105,9 @@ triton/backends/amd/include/roctracer/ext/prof_protocol.h,sha256=6FAcvVD-dNM7uul
|
|
|
105
105
|
triton/backends/amd/lib/ockl.bc,sha256=wQKCzkKukIHbu0lyjKUYlhndc7S27xto6L54J0Bn-C0,246124
|
|
106
106
|
triton/backends/amd/lib/ocml.bc,sha256=UPNTXW0gCXUNB-c6orSYwb-mz9_mjUc7zny_vfFza44,205964
|
|
107
107
|
triton/backends/nvidia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
|
-
triton/backends/nvidia/compiler.py,sha256=
|
|
108
|
+
triton/backends/nvidia/compiler.py,sha256=cKKtU92WsvwgU30m902d8OI7MnVGI_2RriZdi1ujNDQ,16649
|
|
109
109
|
triton/backends/nvidia/driver.c,sha256=8m1JB-t52GN1LoAFNlpLmM9DHuBxNIHL2VHFLTyJp8g,18906
|
|
110
|
-
triton/backends/nvidia/driver.py,sha256=
|
|
110
|
+
triton/backends/nvidia/driver.py,sha256=B_d89ULS6F63CgtUA04TRUdpws3e6ZVFI3YbG5-j7S0,17696
|
|
111
111
|
triton/backends/nvidia/bin/ptxas.exe,sha256=2m-Z7N6rSw_zUngI0Zza4eMzhqglEEQQ6sMkev8cAr8,19580416
|
|
112
112
|
triton/backends/nvidia/include/cuda.h,sha256=6SN2FpBhqz9-wdKnWN4_R3q18-auO67gdcBp-cEiSpE,1072817
|
|
113
113
|
triton/backends/nvidia/lib/libdevice.10.bc,sha256=XC-uN8huaMOjhgWpX1EtfRLV89uYYxC-R_VzBKpype4,473728
|
|
@@ -134,7 +134,7 @@ triton/language/extra/hip/__init__.py,sha256=ieSER4LeX9_0horChGUUVwpuKAprkuka8uG
|
|
|
134
134
|
triton/language/extra/hip/libdevice.py,sha256=EVraUfeXzQmN3F5Lleg2mohVcbFWOWlLaAH1nkbqtV4,16841
|
|
135
135
|
triton/runtime/__init__.py,sha256=mKL5cqIBDUw2WO80NRCh4s1G8KYaqgM59TTAbTkPPjQ,621
|
|
136
136
|
triton/runtime/autotuner.py,sha256=BJe69v9MSMSzdkvYSUDrvXrAFeLZ1x6A-7aUmpz2Le0,17271
|
|
137
|
-
triton/runtime/build.py,sha256=
|
|
137
|
+
triton/runtime/build.py,sha256=rZdId897p7aZmu8Jg_LhORkFgiD6wiE0JYiG6C7TdpU,4771
|
|
138
138
|
triton/runtime/cache.py,sha256=xMLfnhhgGoG2H5u7zQTydao4H0nenvAy0Or7btKWLiM,10591
|
|
139
139
|
triton/runtime/driver.py,sha256=VZ-883Xri71R72lHB6usIpLo3gGLbZJkAlLP3ewWSpc,1509
|
|
140
140
|
triton/runtime/errors.py,sha256=oj73dn34qJbLhOjakakAuZPSv-laZyIYylJiJwREA8Y,787
|
|
@@ -232,13 +232,13 @@ triton/runtime/tcc/lib/python3.def,sha256=o8MijZkdWOnHNPU4fmJrT1qw3fWSlaegC969H_
|
|
|
232
232
|
triton/runtime/tcc/lib/user32.def,sha256=EcYohyyDgmz9fLBoOR-vszLeJ2YkBUoNGvSnuXrkum0,10439
|
|
233
233
|
triton/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
234
234
|
triton/tools/build_extern.py,sha256=jCr-2hu3nLGBIJhCGUQ1jAyzLttughjkiPGEwRFjLR0,13673
|
|
235
|
-
triton/tools/compile.c,sha256=
|
|
235
|
+
triton/tools/compile.c,sha256=Kb62pyFgeabw_d8ciNV3O2dLN2_cb6KlAlrFaRVUVVc,2117
|
|
236
236
|
triton/tools/compile.h,sha256=n9QKIFZTL4RSsiXtAxBP9XGSnxjyaevQQ9bBpwDsvAg,332
|
|
237
237
|
triton/tools/compile.py,sha256=b3yNnVgoBk8WzOs87JrZPDIyasdSgAslOWmxse1J6yM,6761
|
|
238
238
|
triton/tools/disasm.py,sha256=BBO4bALdLcWgWDLhQdYHLlTx3oo8g_d8maeE_Uu-FmU,5088
|
|
239
239
|
triton/tools/experimental_descriptor.py,sha256=0Wqy96Cc6YLh9o0eTknW-Lfvha6lfRSfe8bswkcPHMs,1260
|
|
240
240
|
triton/tools/link.py,sha256=u7qtfZRLriZkAMEGNvj8YF-k1cthmLL7BwHYqBgT63E,11871
|
|
241
|
-
triton_windows-3.2.0.
|
|
242
|
-
triton_windows-3.2.0.
|
|
243
|
-
triton_windows-3.2.0.
|
|
244
|
-
triton_windows-3.2.0.
|
|
241
|
+
triton_windows-3.2.0.post18.dist-info/METADATA,sha256=lPIYRbAkCh0zKhcxyfDBKA654-t_DfpozxMbXpdH9ho,1514
|
|
242
|
+
triton_windows-3.2.0.post18.dist-info/WHEEL,sha256=ovhA9_Ei_7ok2fAych90j-feDV4goiAxbO7REePtvw0,101
|
|
243
|
+
triton_windows-3.2.0.post18.dist-info/top_level.txt,sha256=iIyUoyO6Ld8jQHWY9plUyco-emBXKTqVmuAXJAGvmEk,211
|
|
244
|
+
triton_windows-3.2.0.post18.dist-info/RECORD,,
|
{triton_windows-3.2.0.post17.dist-info → triton_windows-3.2.0.post18.dist-info}/top_level.txt
RENAMED
|
File without changes
|