triton-windows 3.3.0a0.post15__cp312-cp312-win_amd64.whl → 3.3.0a0.post17__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 CHANGED
Binary file
@@ -403,11 +403,10 @@ class CUDABackend(BaseBackend):
403
403
 
404
404
  def make_cubin(self, src, metadata, opt, capability):
405
405
  ptxas, _ = get_ptxas(self.target.arch)
406
- # On Windows, we need to set delete=False, close the temp file before reading it, and manually remove it
407
406
  with tempfile.NamedTemporaryFile(delete=False, mode='w', suffix='.ptx') as fsrc, \
408
407
  tempfile.NamedTemporaryFile(delete=False, mode='r', suffix='.log') as flog:
409
408
  fsrc.write(src)
410
- fsrc.close()
409
+ fsrc.flush()
411
410
  fbin = fsrc.name + '.o'
412
411
 
413
412
  line_info = ["-lineinfo", "-suppress-debug-info"] if os.environ.get("TRITON_DISABLE_LINE_INFO",
@@ -417,10 +416,8 @@ class CUDABackend(BaseBackend):
417
416
  opt_level = ['--opt-level', '0'] if os.environ.get("DISABLE_PTXAS_OPT", "0") == "1" else []
418
417
  ptxas_cmd = [ptxas, *line_info, *fmad, '-v', *opt_level, f'--gpu-name={arch}', fsrc.name, '-o', fbin]
419
418
  try:
420
- subprocess.run(ptxas_cmd, check=True, close_fds=False, stdout=flog, stderr=flog)
421
- flog.close()
419
+ subprocess.run(ptxas_cmd, check=True, close_fds=True, stdout=flog, stderr=flog)
422
420
  except subprocess.CalledProcessError as e:
423
- flog.close()
424
421
  with open(flog.name) as log_file:
425
422
  log = log_file.read()
426
423
 
@@ -434,13 +431,14 @@ class CUDABackend(BaseBackend):
434
431
  raise PTXASError(f"{error}\n"
435
432
  f"`ptxas` stderr:\n{log}\n"
436
433
  f'Repro command: {" ".join(ptxas_cmd)}\n')
437
- finally:
438
- try_remove(fsrc.name)
439
- try_remove(flog.name)
440
434
 
441
- with open(fbin, 'rb') as f:
442
- cubin = f.read()
443
- try_remove(fbin)
435
+ with open(fbin, 'rb') as f:
436
+ cubin = f.read()
437
+ try_remove(fbin)
438
+
439
+ # It's better to remove the temp files outside the context managers
440
+ try_remove(fsrc.name)
441
+ try_remove(flog.name)
444
442
  return cubin
445
443
 
446
444
  def add_stages(self, stages, options):
triton/runtime/cache.py CHANGED
@@ -131,7 +131,15 @@ class FileCacheManager(CacheManager):
131
131
  f.write(data)
132
132
  # Replace is guaranteed to be atomic on POSIX systems if it succeeds
133
133
  # so filepath cannot see a partial write
134
- os.replace(temp_path, filepath)
134
+ try:
135
+ os.replace(temp_path, filepath)
136
+ except PermissionError:
137
+ # Ignore PermissionError on Windows because it happens when another process already
138
+ # put a file into the cache and locked it by opening it.
139
+ if os.name == "nt":
140
+ os.remove(temp_path)
141
+ else:
142
+ raise
135
143
  os.removedirs(temp_dir)
136
144
  return filepath
137
145
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: triton-windows
3
- Version: 3.3.0a0.post15
3
+ Version: 3.3.0a0.post17
4
4
  Summary: A language and compiler for custom Deep Learning operations
5
5
  Home-page: https://github.com/woct0rdho/triton-windows
6
6
  Author: Philippe Tillet, Dian Wu
@@ -4,7 +4,7 @@ triton/_utils.py,sha256=5RiCLwW14w0Q3mdZ-9yz-VO5KiSexNj9xeDt4gaNsvE,1014
4
4
  triton/errors.py,sha256=8WfnuRKLG578mgY6cBA3ECruVMf9ULEKFNgRcJ6IhWM,89
5
5
  triton/testing.py,sha256=ivFf1Fq9frmfVahaVUp0bgJxmvVZNACZfj3Sai6zfAs,20048
6
6
  triton/windows_utils.py,sha256=aQMItmuZNXaki8zSB7HMvhy1RsXlmz1GcO-lORm1IIk,10852
7
- triton/_C/libtriton.pyd,sha256=aOtQ6tmASJ_qFMd6IPQX0Zbmn1ByGbHM6BXF2r8Murc,86836224
7
+ triton/_C/libtriton.pyd,sha256=Ly4JelI_9qSPSKD4rraH6fY20GdrCU0Ot9L0NPupJjk,86836224
8
8
  triton/backends/__init__.py,sha256=opAo_vgEMt3tLO_bYFrYGksnIu0qohbmyuu_s3-rNAs,1595
9
9
  triton/backends/compiler.py,sha256=ymaG0kpveAuESbQ9QZ0RyXjr0Aq4el_G5XGYogJ2gNA,3588
10
10
  triton/backends/driver.py,sha256=AN60upJlPgia0JwvZ8vIVgLITNPuI0fdz8zMIIHPpF4,1450
@@ -112,7 +112,7 @@ triton/backends/amd/lib/asanrtl.bc,sha256=1xv2RlU3WvbdsghHlmhwiHewGM2B5dKts5bERM
112
112
  triton/backends/amd/lib/ockl.bc,sha256=wQKCzkKukIHbu0lyjKUYlhndc7S27xto6L54J0Bn-C0,246124
113
113
  triton/backends/amd/lib/ocml.bc,sha256=UPNTXW0gCXUNB-c6orSYwb-mz9_mjUc7zny_vfFza44,205964
114
114
  triton/backends/nvidia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
- triton/backends/nvidia/compiler.py,sha256=R0WKIM_JsMcd3nlwnrlB8pXPjyDj6egaaFxNwi2hneM,18588
115
+ triton/backends/nvidia/compiler.py,sha256=iHbIl-HXSgD3S5eJIXbQhr-Cyk9Gq_g8RXDFZxAGUF4,18444
116
116
  triton/backends/nvidia/driver.c,sha256=RWzdn9_RWaaVxXKtdrvxoRg4yR7WSH7ELRyjGDYKwBM,18880
117
117
  triton/backends/nvidia/driver.py,sha256=BcEzr0_ONM8H_DKoCbNuO1jRpBM_XHKBgt_Y2bG9aZw,20902
118
118
  triton/backends/nvidia/bin/ptxas.exe,sha256=iCva9hIYg-Q2NybchwaQJFkwDzNiliFOTDdZrHPLb6A,24732160
@@ -143,7 +143,7 @@ triton/runtime/__init__.py,sha256=mKL5cqIBDUw2WO80NRCh4s1G8KYaqgM59TTAbTkPPjQ,62
143
143
  triton/runtime/_allocation.py,sha256=zaW4B7I7c-2rkVuN7IZaUB6IQSI1t4FvnTPZH-r7DTk,798
144
144
  triton/runtime/autotuner.py,sha256=h1I6TDPPYtMvuwOkeprcSD3VKKGXk952jXN64oPIFXs,16844
145
145
  triton/runtime/build.py,sha256=6Ie4gn4-Zk1DIW3o-Nd002IhtEm_yikXh9o6tUm6iao,3279
146
- triton/runtime/cache.py,sha256=Vs9l4DeRhKXyB-hfDBrp5v85OO6vkkXTHTVjZ7zu0xg,10260
146
+ triton/runtime/cache.py,sha256=uoU1UH3HPxkxT0r-69HIZgLBls3T-TDxJedRULX9lbM,10583
147
147
  triton/runtime/driver.py,sha256=VZ-883Xri71R72lHB6usIpLo3gGLbZJkAlLP3ewWSpc,1509
148
148
  triton/runtime/errors.py,sha256=CwfJXciwel_-K3BfQfKUpLPDWrSyTnGsfJkqJojrdfQ,1052
149
149
  triton/runtime/interpreter.py,sha256=RVzNGSXyLlg14LgjJ5BZ3qbqfK49FccG-pXaIXXXE2g,59331
@@ -247,7 +247,7 @@ triton/tools/link.py,sha256=u7qtfZRLriZkAMEGNvj8YF-k1cthmLL7BwHYqBgT63E,11871
247
247
  triton/tools/mxfp.py,sha256=YQdpBrGkOVNOtnLeRjMCeVFHWkSwUubGeWsItIjO8TU,11737
248
248
  triton/tools/extra/cuda/compile.c,sha256=Me7beHPc6WNTwjg85H84DUMCRu4KJdVK2hNNgvlhBZ4,2126
249
249
  triton/tools/extra/cuda/compile.h,sha256=n9QKIFZTL4RSsiXtAxBP9XGSnxjyaevQQ9bBpwDsvAg,332
250
- triton_windows-3.3.0a0.post15.dist-info/METADATA,sha256=pnp3W_MNnmJ3LJy6cNWAuAgOdrpJo3AfJvfERYBNwB4,1629
251
- triton_windows-3.3.0a0.post15.dist-info/WHEEL,sha256=A8mRFNvJcDL8dRPZ6k2ICKEOXwE8pzYFXYxEla0rR0g,101
252
- triton_windows-3.3.0a0.post15.dist-info/top_level.txt,sha256=KhMzHYsArnZ3IkjAQ-xLnx1n_FjvEpJNelg2xPiDl-U,254
253
- triton_windows-3.3.0a0.post15.dist-info/RECORD,,
250
+ triton_windows-3.3.0a0.post17.dist-info/METADATA,sha256=Hj5t_K8_B7fKw2Tp4ki_-rOSVDJ4TWFlJMJ8S_tqShc,1629
251
+ triton_windows-3.3.0a0.post17.dist-info/WHEEL,sha256=9_mdKl-_Yr--f6EOmQ6F9FLhZL1o0okl1kr9b_edmVI,101
252
+ triton_windows-3.3.0a0.post17.dist-info/top_level.txt,sha256=KhMzHYsArnZ3IkjAQ-xLnx1n_FjvEpJNelg2xPiDl-U,254
253
+ triton_windows-3.3.0a0.post17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (77.0.1)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-win_amd64
5
5