diff options
author | David Elsing <david.elsing@posteo.net> | 2025-01-22 18:32:23 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2025-01-27 14:42:40 +0100 |
commit | 09e78c34af071f1c0b09d673ed243829739a9239 (patch) | |
tree | d42d3c51b9c24aeb52647bc1073d633ed1def7be /gnu/packages/machine-learning.scm | |
parent | a0a9044d356295be45841add1c239d377ebb3ddf (diff) |
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>
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r-- | gnu/packages/machine-learning.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 39defe6271..66d076690c 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -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) |