Skip to content

Commit fd4fce2

Browse files
[inductor] Make inductor work with new triton kernel launch API (#610)
Signed-off-by: Whitney Tsang <whitney.tsang@intel.com>
1 parent 695fb4a commit fd4fce2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

intel_extension_for_pytorch/_inductor/xpu/triton_heuristics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
try:
3333
from triton.compiler.compiler import ASTSource
34+
from triton.backends.compiler import GPUTarget
3435
except ImportError:
3536
warnings.warn(
3637
"XPU: Import error on ASTSource, if this is not the case, \
@@ -128,7 +129,8 @@ def _precompile_config(self, cfg: Config, warm_cache_only_with_cc: Dict):
128129
),
129130
)
130131

131-
target = (compile_meta["device_type"], cc)
132+
warp_size = 32
133+
target = GPUTarget(compile_meta["device_type"], cc, warp_size)
132134
options = {
133135
"num_warps": compile_meta["num_warps"],
134136
"num_stages": compile_meta["num_stages"],

0 commit comments

Comments
 (0)