[ROCm][Windows] Enable AOTriton runtime compile on Windows (#165538)

AOTriton uses prebuilt runtime binaries if the user's ROCm version matches the ones used to generate the prebuilt runtime. However, since there's no prebuilt runtime available for Windows, this check needs to be bypassed for Windows. This PR enables it by changing condition to always build AOTriton runtime from source on Windows.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165538
Approved by: https://github.com/xinyazhang, https://github.com/jeffdaily
This commit is contained in:
tvukovic-amd
2025-10-16 19:51:39 +00:00
committed by PyTorch MergeBot
parent d4a713cd9c
commit 7df9aca529

View File

@ -244,7 +244,8 @@ if(NOT __AOTRITON_INCLUDED)
else()
set(__AOTRITON_SYSTEM_ROCM "${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}")
list(FIND __AOTRITON_ROCM_LIST "rocm${__AOTRITON_SYSTEM_ROCM}" __AOTRITON_RUNTIME_INDEX)
if(${__AOTRITON_RUNTIME_INDEX} LESS 0)
# Always build aotriton runtime from source on Windows due to lack of pre-built binaries
if(${__AOTRITON_RUNTIME_INDEX} LESS 0 OR WIN32)
message(STATUS "Cannot find AOTriton runtime for ROCM ${__AOTRITON_SYSTEM_ROCM}. \
Build runtime from source")
aotriton_build_from_source(ON aotriton_runtime)