oneDNN: Build failure in src/cpu/aarch64/jit_uni_softmax.hpp
Summary
The recent changes to the Softmax primitive (https://github.com/oneapi-src/oneDNN/commit/2622509c9568259e32a9f4d8f83e2c0252efce2d) appear to have broken the build on AArch64, which now fails for both Clang and GCC.
Version
Build failure observed with the current HEAD: https://github.com/oneapi-src/oneDNN/commit/2622509c9568259e32a9f4d8f83e2c0252efce2d Previous commit is working fine: https://github.com/oneapi-src/oneDNN/commit/8b68d014abe8d8fb86c7a97e80cea0d4c24b6b8c
Environment
- CPU make and model: Neoverse-N1 (AArch64)
- OS version: CentOS 8 and Ubuntu 20.04
- Compiler version: Clang 9, GCC 7, 8, 9 and 10
- CMake version: 3.20.1
Steps to reproduce
- Checkout current HEAD of master
mkdir build && cd buildcmake -DDNNL_CPU_RUNTIME=OMP -DDNNL_BUILD_FOR_CI=ON ../. && make -j
Observed behavior
The recent changes to the Softmax primitive (https://github.com/oneapi-src/oneDNN/commit/2622509c9568259e32a9f4d8f83e2c0252efce2d) appear to have broken the build on AArch64, which now fails for both Clang (v9) and GCC (v7, 8, 9 and 10), with an error of the form:
In file included from /code/oneDNN/src/cpu/aarch64/jit_uni_softmax.cpp:30:
/code/oneDNN/src/cpu/aarch64/jit_uni_softmax.hpp: In member function 'dnnl::impl::status_t dnnl::impl::cpu::aarch64::jit_uni_softmax_bwd_t<isa>::pd_t::init(dnnl::impl::engine_t*)':
/code/oneDNN/src/cpu/aarch64/jit_uni_softmax.hpp:135:44: error: there are no arguments to 'set_default_formats_common' that depend on a template parameter, so a declaration of 'set_default_formats_common' must be available [-fpermissive]
135 | && mayiuse(sve_512) && set_default_formats_common()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/code/oneDNN/src/cpu/aarch64/jit_uni_softmax.hpp:135:44: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
I think, looking at the x86 implementation, it should be sufficient to swap set_default_formats_common() for set_default_formats() == status::success in src/cpu/aarch64/jit_uni_softmax.cpp. With this change it builds OK, and make test passes on AArch64. But I’m not that familiar with the aarch64/jit_uni_* codebase.
Expected behavior
cmake -DDNNL_CPU_RUNTIME=OMP -DDNNL_BUILD_FOR_CI=ON ../. && make -j should lead to a sucessfull build.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (19 by maintainers)
@kawakami-k - I’ve pushed that fix to https://github.com/oneapi-src/oneDNN/pull/1276 now, thanks for pointing the mistake out.