You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here is clear: -mcpu=native is expanded by GCC to -mcpu=zeus+crypto+sha3+sm4+nodotprod+noprofile+nopauth, which clashes with the -march=armv8.2-a+fp16+dotprod that is used when building one of the XNNPACK kernels.
As mentioned in #1884 this can be fixed by simply not using -mcpu when building XNNPACK.
This makes sense, but I do want to use -mcpu=native when building TensorFlow (and the other external libraries it needs)...
Is there a way that -mcpu=native can be filtered out by XNNPACK itself when it got passed in via bazel build --copt, for example by modifying xnnpack_cc_library in build_defs.bzl somehow?
I'm not very familiar with Bazel myself, but I couldn't figure out a way after searching around for a couple of hours.
The only option I saw was using nocopts, but apparently this is no longer supported even though the Bazel documentation still mentions it (see bazelbuild/bazel#8706)...
The text was updated successfully, but these errors were encountered:
@ngzhian Thanks a lot for the suggestion, that's working like a charm: by using --per_file_copt='-.*XNNPACK/.*@-mcpu=native' instead of --copt='-mcpu=native' I can avoid that -mcpu=native is used when building XNNPACK, while it's still being used for everything else 👍
I'm hitting problems with building XNNPACK during the build of TensorFlow on Arm 64-bit, when using
bazel build --copt="-mcpu=native" ...
:(see also easybuilders/easybuild-easyconfigs#18899)
The problem here is clear:
-mcpu=native
is expanded by GCC to-mcpu=zeus+crypto+sha3+sm4+nodotprod+noprofile+nopauth
, which clashes with the-march=armv8.2-a+fp16+dotprod
that is used when building one of the XNNPACK kernels.As mentioned in #1884 this can be fixed by simply not using
-mcpu
when building XNNPACK.This makes sense, but I do want to use
-mcpu=native
when building TensorFlow (and the other external libraries it needs)...Is there a way that
-mcpu=native
can be filtered out by XNNPACK itself when it got passed in viabazel build --copt
, for example by modifyingxnnpack_cc_library
in build_defs.bzl somehow?I'm not very familiar with Bazel myself, but I couldn't figure out a way after searching around for a couple of hours.
The only option I saw was using
nocopts
, but apparently this is no longer supported even though the Bazel documentation still mentions it (see bazelbuild/bazel#8706)...The text was updated successfully, but these errors were encountered: