[MacPorts] #65682: py-pytorch: variant +mps causes build failures for 10.12 and 10.13

MacPorts noreply at macports.org
Wed Aug 17 14:28:21 UTC 2022


#65682: py-pytorch: variant +mps causes build failures for 10.12 and 10.13
---------------------+------------------------
 Reporter:  mascguy  |      Owner:  mascguy
     Type:  defect   |     Status:  assigned
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:  2.7.2
 Keywords:           |       Port:  py-pytorch
---------------------+------------------------
 The latest update to this port added support for Metal Performance
 Shaders, via variant `+mps`. And that's enabled by default.

 However, builds are now failing on 10.12 and 10.13, with the following
 compilation error:

 {{{
 [  0%] Building CXX object
 third_party/fbgemm/asmjit/CMakeFiles/asmjit.dir/src/asmjit/core/archtraits.cpp.o
 In file included from
 py39-pytorch/work/pytorch-1.12.0/third_party/fbgemm/third_party/asmjit/src/asmjit/core/archtraits.cpp:25:
 In file included from
 py39-pytorch/work/pytorch-1.12.0/third_party/fbgemm/third_party/asmjit/src/asmjit/core/../core/archtraits.h:28:
 py39-pytorch/work/pytorch-1.12.0/third_party/fbgemm/third_party/asmjit/src/asmjit/core/../core/operand.h:910:79:
 error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-
 instead-of-logical]
   static inline bool isGp(const Operand_& op, uint32_t rId) noexcept {
 return isGp(op) & (op.id() == rId); }
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 &&
 }}}

 Example builds, for `py39-pytorch`:
 *
 https://build.macports.org/builders/ports-10.12_x86_64-builder/builds/195750/steps
 /install-port/logs/stdio
 *
 https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/159737/steps
 /install-port/logs/stdio

 It appears (?) that MPS functionality is only present in 10.13 and later.
 Assuming that's the case, we shouldn't declare the variant for 10.12 and
 earlier.

 As for the current failure: Presumably we should be able to ensure
 `-Wbitwise-instead-of-logical` is simply a warning, rather than an error.

-- 
Ticket URL: <https://trac.macports.org/ticket/65682>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list