Skip to content

Commit ff0309c

Browse files
Get icpx by default in kernel build (#4792)
From compiler team, when explicitly `export CXX=icpx`, kernel would be compiled without `-fsycl`. This change fix this issue.
1 parent c056d82 commit ff0309c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python/triton/runtime/build.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@ def _build(name: str, src: str, srcdir: str, library_dirs: list[str], include_di
7878
include_dirs = include_dirs + [srcdir, py_include_dir, *custom_backend_dirs]
7979

8080
if is_xpu():
81-
icpx = None
82-
cxx = os.environ.get("CXX")
81+
icpx = shutil.which("icpx")
82+
cxx = shutil.which(os.environ.get("CXX", "shutil-dummy-value"))
8383
if cxx is None:
8484
clangpp = shutil.which("clang++")
8585
gxx = shutil.which("g++")
86-
icpx = shutil.which("icpx")
8786
cl = shutil.which("cl")
8887
cxx = icpx or cl if os.name == "nt" else icpx or clangpp or gxx
8988
if cxx is None:

0 commit comments

Comments
 (0)