From 2ebe24c67403e13e91902a549448162ac878b3dc Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Fri, 25 Jul 2025 15:36:04 -0700 Subject: [PATCH] [torch] Move rocblas include out of namespace. --- ...ocblas-include-to-fix-Windows-builds.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 external-builds/pytorch/patches/pytorch/main/pytorch/hipified/0004-Move-rocblas-include-to-fix-Windows-builds.patch diff --git a/external-builds/pytorch/patches/pytorch/main/pytorch/hipified/0004-Move-rocblas-include-to-fix-Windows-builds.patch b/external-builds/pytorch/patches/pytorch/main/pytorch/hipified/0004-Move-rocblas-include-to-fix-Windows-builds.patch new file mode 100644 index 00000000000..7cc751d4a91 --- /dev/null +++ b/external-builds/pytorch/patches/pytorch/main/pytorch/hipified/0004-Move-rocblas-include-to-fix-Windows-builds.patch @@ -0,0 +1,38 @@ +From 57920ad27347711d86680ddfd1055eba56571ef0 Mon Sep 17 00:00:00 2001 +From: Scott Todd +Date: Fri, 25 Jul 2025 15:33:42 -0700 +Subject: [PATCH 4/4] Move rocblas include to fix Windows builds. + +--- + aten/src/ATen/hip/CublasHandlePool.cpp | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/aten/src/ATen/hip/CublasHandlePool.cpp b/aten/src/ATen/hip/CublasHandlePool.cpp +index 3a77fe70477..106735158f4 100644 +--- a/aten/src/ATen/hip/CublasHandlePool.cpp ++++ b/aten/src/ATen/hip/CublasHandlePool.cpp +@@ -11,6 +11,11 @@ + #include + #include + ++// ugly hack until hipblasSetWorkspace exists ++#if defined(USE_ROCM) ++#include ++#endif ++ + /** + * Note [hipblaslt handles] + * ~~~~~~~~~~~~~~~~~~~~~~~~ +@@ -53,9 +58,6 @@ void destroyCublasLtHandle(hipblasLtHandle_t handle) { + + using CuBlasLtPoolType = DeviceThreadHandlePool; + +-// ugly hack until hipblasSetWorkspace exists +-#include +- + static hipblasStatus_t rocBLASStatusToHIPStatus(rocblas_status error) { + switch(error) { + case rocblas_status_size_unchanged: +-- +2.47.1.windows.2 +