sci-ml/pytorch: remove unused patch

Signed-off-by: Michael Mair-Keimberger <mm1ke@gentoo.org>
This commit is contained in:
Michael Mair-Keimberger
2026-02-15 12:43:18 +01:00
parent 884c712ecb
commit 07f482216e
@@ -1,22 +0,0 @@
Fixes parsing of Clang versions like 20.1.7+libcxx
Upstream bug: https://github.com/pytorch/pytorch/issues/157665
--- a/torch/utils/cpp_extension.py
+++ b/torch/utils/cpp_extension.py
@@ -434,13 +434,12 @@ def get_compiler_abi_compatibility_and_version(compiler) -> tuple[bool, TorchVer
try:
if IS_LINUX:
minimum_required_version = MINIMUM_GCC_VERSION
- versionstr = subprocess.check_output([compiler, '-dumpfullversion', '-dumpversion'])
- version = versionstr.decode(*SUBPROCESS_DECODE_ARGS).strip().split('.')
+ compiler_info = subprocess.check_output([compiler, '-dumpfullversion', '-dumpversion'])
else:
minimum_required_version = MINIMUM_MSVC_VERSION
compiler_info = subprocess.check_output(compiler, stderr=subprocess.STDOUT)
- match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode(*SUBPROCESS_DECODE_ARGS).strip())
- version = ['0', '0', '0'] if match is None else list(match.groups())
+ match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode(*SUBPROCESS_DECODE_ARGS).strip())
+ version = ['0', '0', '0'] if match is None else list(match.groups())
except Exception:
_, error, _ = sys.exc_info()
warnings.warn(f'Error checking compiler version for {compiler}: {error}')