Skip to content

Commit 85685a8

Browse files
committed
Use sysconfig instead of condition
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 6fb00f3 commit 85685a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/triton/backends/compiler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import re
33
import subprocess
4+
import sysconfig
45

56
from abc import ABCMeta, abstractmethod, abstractclassmethod
67
from dataclasses import dataclass
@@ -25,7 +26,7 @@ def __init__(self, target: GPUTarget) -> None:
2526

2627
@staticmethod
2728
def _path_to_binary(binary: str):
28-
binary += ".exe" if os.name == "nt" else ""
29+
binary += sysconfig.get_config_var("EXE")
2930
base_dir = os.path.join(os.path.dirname(__file__), os.pardir)
3031
paths = [
3132
os.environ.get(f"TRITON_{binary.upper()}_PATH", ""),

0 commit comments

Comments
 (0)