Skip to content

New VSX support breaks compilation if using g++ v7 (ppc64le) #50439

@dncliss

Description

@dncliss

🐛 Bug

The addition of VSX support in #41541 causes ppc64le pytorch builds to fail when using (e.g.) g++ version 7.4.
The reason for this is that there are some VEC builtins, e.g. vec_neg, vec_signed, vec_sldw that were new to g++ version 8.

When building with g++ 7.4, you see a number of errors of the form error: 'vec_signed' was not declared in this scope -- obviously a direct result of them not being present as built-ins in that version. A compilation with 8.4 confirms this error is not seen.

To Reproduce

Steps to reproduce the behavior:

Build pytorch (master) with the 7.4 g++ compiler; the failure will be seen when you reach file aten/src/ATen/native/cpu/UpSampleMoreKernel.cpp.VSX.cpp

Expected behavior

The obvious answer is just to say "Well, build this with 8.4 then". But there are better alternatives for expected behavior:

  • The build should check the compiler version in use. Then, preferably, it should skip the VSX enhancement if the compiler is version <8 (perhaps with a warning).
  • Less desirable (but better than current) would be to fail immediately at the outset upon finding the required compiler version isn't in use.
    But surely, it would be nice to still be able to build successfully even if it means not enabling this new feature (it should be possible to conditionally exclude, e.g. it isn't built for x86).

Environment

The only relevant environment info is ppc64le (power) platform and g++ less than version 8.

This was discovered building on the OSU lab image: osuosl/ubuntu-ppc64le-cuda:10.2-cudnn7
This image is the one used for CI builds, which started failing Dec 11 on Power; notice the
red "failing" status on the pytorch README github landing page.

cc @malfet @seemethere @walterddr

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: POWERIssues specific to the POWER/ppc architecturemodule: buildBuild system issuesmodule: build warningsRelated to warnings during build processtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions