From 5b352c3088ad90c88712b62ff270bcb769c897c6 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Fri, 2 May 2025 04:39:19 -0400 Subject: [PATCH] py-torch: patch FindBLAS.cmake (#50273) Pulls in the patch from https://github.com/pytorch/pytorch/pull/145849 to fix the following error: CMake Error at cmake/Modules/FindBLAS.cmake:85 (check_function_exists): Unknown CMake command "check_function_exists". --- var/spack/repos/builtin/packages/py-torch/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index fc89de5c1c7..699de840732 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -346,6 +346,13 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): when="@2.6:", ) + # Fixes 'FindBLAS.cmake' error: unknown command check_function_exists + patch( + "https://github.com/pytorch/pytorch/pull/145849.patch?full_index=1", + sha256="5675ab543b786b8f360de451b27b3eb5d3ce8499d6c1a207f4a854f0c473ab03", + when="@:2.6", + ) + # https://github.com/pytorch/pytorch/issues/90448 patch( "https://github.com/pytorch/pytorch/pull/97270.patch?full_index=1",