#65682 closed defect (fixed)
py-pytorch: variant +mps causes build failures for 10.12 and 10.13
Reported by: | mascguy (Christopher Nielsen) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | essandess (Steve Smith) | |
Port: | py-pytorch |
Description
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.
Change History (9)
comment:1 follow-up: 2 Changed 2 years ago by Christopher Nielsen <mascguy@…>
comment:2 follow-up: 3 Changed 2 years ago by essandess (Steve Smith)
Replying to Christopher Nielsen <mascguy@…>:
In 217f82b3d74997385429448e06addc1322d09fb3/macports-ports (master):
Should this be revbumped because there's a compilation change?
comment:3 Changed 2 years ago by mascguy (Christopher Nielsen)
Replying to essandess:
Should this be revbumped because there's a compilation change?
No, as we're not materially changing anything. Rather, we're simply ensuring that builds don't fail, for the bitwise-instead-of-logical
case.
comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Still failing, might be fixable by specifying the cxx standard though.
comment:6 Changed 2 years ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:7 Changed 2 years ago by mascguy (Christopher Nielsen)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:8 Changed 2 years ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:9 Changed 2 years ago by mascguy (Christopher Nielsen)
Steve, at the risk of jinxing myself, the builds look good so far. And if nothing else, the bitwise failure is fixed.
I also queued 10.12 and 10.13 rebuilds, for py-torchaudio
, py-pytorch-ligtning
, and py-fairseq
.
In 217f82b3d74997385429448e06addc1322d09fb3/macports-ports (master):