[Bug 269739] misc/pytorch: fix build on arm64 and i386 (draft)

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 21 Feb 2023 17:22:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269739

            Bug ID: 269739
           Summary: misc/pytorch: fix build on arm64 and i386 (draft)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: yuri@freebsd.org
          Reporter: fuz@FreeBSD.org
             Flags: maintainer-feedback?(yuri@freebsd.org)
          Assignee: yuri@freebsd.org

Created attachment 240303
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=240303&action=edit
misc/pytorch: fix build on arm64 and i386 (draft)

I've tried to fix the build on arm64 and i386 and got misc/pytorch to build
there.  But now it doesn't build on amd64 anymore and the error appears
unrelated:

/wrkdirs/usr/ports/misc/pytorch/work/pytorch-v1.13.1/aten/src/ATen/cpu/vec/vec256/vec256_bfloat16.h:253:16:
error: cannot initialize a parameter of type 'const __m256 (*)(__m256)' with an
lvalue of type '__m256 (__m256)': different return type ('const __m256' (vector
of 8 'float' values) vs '__m256' (vector of 8 'float' values))
    return map(Sleef_acosf8_u10);
               ^~~~~~~~~~~~~~~~

I've tried to patch around this error, just to get additional errors in other
constellations of this function.  It's maddening.  Unfortunately I do not know
enough C++ to fix this.

Please see attached patch, perhaps you can make it work.  It also seems like
onnx is bundled in this port, but we provide a separate port for it.  Perhaps
it can be unbundled?

-- 
You are receiving this mail because:
You are the assignee for the bug.