Skip to content

[Feature][Windows] Enable the static XPU Triton launcher (zebin kernel format + StaticXpuLauncher) on Windows #6167

Description

@BartoszKokoszko

Feature: make Inductor's static Triton launcher for XPU work on Windows, so torch._C._StaticXpuLauncher is available and CachingAutotuner.can_statically_launch succeeds for XPU kernels.

Motivation: today it is unavailable on Windows for two reasons:

  1. Root dependency: the static launcher requires Triton to compile kernels to zebin, which depends on ocloc. Windows does not have ocloc installed by default.
  2. torch/_inductor/utils.py:496: XPU_KERNEL_FORMAT = "spv" if _IS_WINDOWS else env("zebin"). With spv, can_statically_launch (runtime/triton_heuristics.py:~3123) raises CannotStaticallyLaunchKernel ("Static XPU ... does not support SPIR-V").
  3. torch/csrc/Module.cpp:~2631 guards StaticXpuLauncher_init with #if defined(USE_XPU) && !defined(_WIN32) (added in pytorch #168952), so even a zebin Windows build has no C++ launcher (hasattr(torch._C, "_StaticXpuLauncher") is False).

Kernels silently fall back to TritonCompileResult, which has no recheck_autotune_cache. Consequences:

Pitch / proposed scope:

  1. Ship ocloc for Windows as a pip wheel (like intel-sycl-rt) and make Triton-XPU find it.
  2. Make Level Zero native-binary (zebin) generation and loading work with Triton-XPU on Windows.
  3. Remove the !_WIN32 guard on StaticXpuLauncher_init; fix Windows build issues.
  4. Enable test_static_triton_launcher.py on XPU-Windows and confirm test_autotune_cache_warm_start passes.

Activity

  1. added theissue type on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmodule: inductortorch.compile backend: Triton codegen, lowering, AOTAutogrados: WindowsWindows Platform

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions