triton-windows 3.3.0a0.post18__cp310-cp310-win_amd64.whl → 3.3.1.post19__cp310-cp310-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
triton/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """isort:skip_file"""
2
- __version__ = '3.3.0'
2
+ __version__ = '3.3.1'
3
3
 
4
4
  # ---------------------------------------
5
5
  # Note: import order is significant here.
@@ -1,3 +1,4 @@
1
+ #define _CRT_SECURE_NO_WARNINGS
1
2
  #include "cuda.h"
2
3
 
3
4
  #ifndef _WIN32
@@ -208,6 +208,7 @@ def make_launcher(constants, signature):
208
208
  params = [f"&arg{i}" for i, ty in signature.items() if ty != "constexpr"]
209
209
  params.append("&global_scratch")
210
210
  src = f"""
211
+ #define _CRT_SECURE_NO_WARNINGS
211
212
  #include \"cuda.h\"
212
213
  #include <stdbool.h>
213
214
  #define PY_SSIZE_T_CLEAN
triton/runtime/build.py CHANGED
@@ -35,6 +35,11 @@ def is_msvc(cc):
35
35
  return cc == "cl" or cc == "cl.exe"
36
36
 
37
37
 
38
+ def is_clang(cc):
39
+ cc = os.path.basename(cc).lower()
40
+ return cc == "clang" or cc == "clang.exe"
41
+
42
+
38
43
  def _cc_cmd(cc, src, out, include_dirs, library_dirs, libraries):
39
44
  if is_msvc(cc):
40
45
  out_base = os.path.splitext(out)[0]
@@ -49,7 +54,10 @@ def _cc_cmd(cc, src, out, include_dirs, library_dirs, libraries):
49
54
  cc_cmd += [f"/PDB:{out_base + '.pdb'}"]
50
55
  else:
51
56
  # for -Wno-psabi, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111047
52
- cc_cmd = [cc, src, "-O3", "-shared", "-fPIC", "-Wno-psabi", "-o", out]
57
+ cc_cmd = [cc, src, "-O3", "-shared", "-Wno-psabi", "-o", out]
58
+ if not (os.name == "nt" and is_clang(cc)):
59
+ # Clang does not support -fPIC on Windows
60
+ cc_cmd += ["-fPIC"]
53
61
  cc_cmd += [f'-l{lib}' for lib in libraries]
54
62
  cc_cmd += [f"-L{dir}" for dir in library_dirs]
55
63
  cc_cmd += [f"-I{dir}" for dir in include_dirs if dir is not None]