gnu: python-pytorch-for-r-torch: Fix build.

The build fails because the types of function pointers with return type
'__m256' and 'const __m256' (or '__m512' and 'const __m512') are not treated
as compatible by the compiler.

* gnu/packages/machine-learning.scm (python-pytorch-for-r-torch)
[arguments]: New field.
[inputs]: Add foxi.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
David Elsing 2025-01-22 18:32:23 +00:00 committed by Ludovic Courtès
parent a0a9044d35
commit 09e78c34af
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -5128,11 +5128,23 @@ Note: currently this package does not provide GPU support.")
(name "python-pytorch")
(version %python-pytorch-for-r-torch-version)
(source %python-pytorch-for-r-torch-src)
(arguments
(substitute-keyword-arguments (package-arguments python-pytorch)
((#:phases phases)
#~(modify-phases #$phases
;; See https://github.com/pytorch/pytorch/issues/61244
(add-after 'unpack 'fix-aten-vec
(lambda _
(substitute*
'("aten/src/ATen/cpu/vec/vec512/vec512_bfloat16.h"
"aten/src/ATen/cpu/vec/vec256/vec256_bfloat16.h")
(("map\\(const __") "map(__"))))))))
(native-inputs
(modify-inputs (package-native-inputs python-pytorch)
(replace "ideep-pytorch" ideep-pytorch-for-r-torch)))
(inputs
(modify-inputs (package-inputs python-pytorch)
(prepend foxi)
(prepend qnnpack)
(replace "qnnpack-pytorch" qnnpack-pytorch-for-r-torch)
(replace "oneapi-dnnl" oneapi-dnnl-for-r-torch)