From 7a1c54114aa07f11bae8c64a077226ea3739aeab Mon Sep 17 00:00:00 2001 From: tvukovic-amd Date: Thu, 16 Oct 2025 19:51:39 +0000 Subject: [PATCH] [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 --- cmake/External/aotriton.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/External/aotriton.cmake b/cmake/External/aotriton.cmake index 5d9158774654..3cc217ebc4f1 100644 --- a/cmake/External/aotriton.cmake +++ b/cmake/External/aotriton.cmake @@ -141,7 +141,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)