oneDNN icon indicating copy to clipboard operation
oneDNN copied to clipboard

build failure in aarch64 with ACL

Open Mchenr opened this issue 2 years ago • 3 comments

Summary

build oneDNN failed with ACL, I found an interface change in ACL from v23.08 to v23.11,they remove the post_ops that causes build fail。 image

there is build log: In file included from /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/cpu_convolution_list.cpp:66: /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/aarch64/acl_indirect_gemm_convolution.hpp: In member function ‘dnnl::impl::status_t dnnl::impl::cpu::aarch64::acl_indirect_gemm_resource_t::configure(const dnnl::impl::cpu::aarch64::acl_conv_conf_t&)’: /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/aarch64/acl_indirect_gemm_convolution.hpp:55:53: error: no matching function for call to ‘arm_compute::Conv2dInfo::Conv2dInfo(const arm_compute::PadStrideInfo&, const arm_compute::Size2D&, const arm_compute::ActivationLayerInfo&, const bool&, int, <brace-enclosed initializer list>, const arm_compute::WeightsInfo&)’ 55 | acp.weights_info)); | ^ In file included from /home/c30040584/ComputeLibrary/arm_compute/runtime/NEON/functions/NEConv3D.h:29, from /home/c30040584/ComputeLibrary/arm_compute/runtime/NEON/NEFunctions.h:42, from /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/aarch64/acl_utils.hpp:30, from /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/aarch64/acl_binary.hpp:22, from /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/aarch64/acl_post_ops.hpp:20, from /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/aarch64/acl_convolution_utils.hpp:22, from /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/aarch64/acl_depthwise_convolution.hpp:20, from /home/c30040584/oneDNN/oneDNN-3.3.3/src/cpu/cpu_convolution_list.cpp:64: /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:61:5: note: candidate: ‘arm_compute::Conv2dInfo::Conv2dInfo(const arm_compute::PadStrideInfo&, const arm_compute::Size2D&, const arm_compute::ActivationLayerInfo&, bool, unsigned int, const arm_compute::WeightsInfo&)’ 61 | Conv2dInfo(const PadStrideInfo &conv_info, | ^~~~~~~~~~ /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:61:5: note: candidate expects 6 arguments, 7 provided /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:59:5: note: candidate: ‘constexpr arm_compute::Conv2dInfo::Conv2dInfo()’ 59 | Conv2dInfo() = default; | ^~~~~~~~~~ /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:59:5: note: candidate expects 0 arguments, 7 provided /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:57:8: note: candidate: ‘constexpr arm_compute::Conv2dInfo::Conv2dInfo(const arm_compute::Conv2dInfo&)’ 57 | struct Conv2dInfo | ^~~~~~~~~~ /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:57:8: note: candidate expects 1 argument, 7 provided /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:57:8: note: candidate: ‘constexpr arm_compute::Conv2dInfo::Conv2dInfo(arm_compute::Conv2dInfo&&)’ /home/c30040584/ComputeLibrary/arm_compute/runtime/FunctionDescriptors.h:57:8: note: candidate expects 1 argument, 7 provided make[2]: *** [src/cpu/CMakeFiles/dnnl_cpu.dir/build.make:160: src/cpu/CMakeFiles/dnnl_cpu.dir/cpu_convolution_list.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:932: src/cpu/CMakeFiles/dnnl_cpu.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

Version

oneDNN: v3.3.3 ACL: v23.11

Environment

oneDNN includes hardware-specific optimizations and may behave differently on depending on the compiler and build environment. Include the following information to help reproduce the issue:

  • CPU make and model: aarch64
  • OS version: 5.10.0-153.12.0.92.oe2203sp2
  • Compiler version: gcc (GCC) 10.3.1
  • CMake version: cmake version 3.22.0
  • CMake output log: -- DNNL_TARGET_ARCH: AARCH64 -- DNNL_LIBRARY_NAME: dnnl -- Arm Compute Library: ComputeLibrary/build/libarm_compute.so;ComputeLibrary/build/libarm_compute_graph.so;ComputeLibrary/build/libarm_compute_core.so -- Arm Compute Library headers: /ComputeLibrary;ComputeLibrary/include -- Could NOT find Doxyrest (missing: DOXYREST_EXECUTABLE) -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7") -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). -- Enabled workload: TRAINING -- Enabled primitives: ALL -- Enabled primitive CPU ISA: ALL -- Enabled primitive GPU ISA: ALL -- Enabled GeMM kernels ISA: ALL -- Primitive cache is enabled -- Graph component is enabled -- Graph compiler backend is disabled. -- Configuring done -- Generating done -- Build files have been written to: oneDNN/oneDNN-3.3.3/build
  • git hash: 16720eaaab9557158ff77ebf3bc610e9682928d6

Steps to reproduce

编译ACL库:scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv8a build=native 编译oneDNN:cmake -DONEDNN_AARCH64_USE_ACL=ON ..

Observed behavior

Expected behavior

Mchenr avatar Jan 08 '24 12:01 Mchenr

+@jondea

vpirogov avatar Jan 08 '24 15:01 vpirogov

Hi @Mchenr, thanks for the bug report! I think the short answer is that oneDNN v3.3 can't build with ACL v23.11. Because of the interface change, it is not possible to support both v23.08 and v23.11. Thanks to https://github.com/oneapi-src/oneDNN/pull/1761 main builds with > v23.11 but I suspect it would be too much of a breaking change to update oneDNN v3.3 to use ACL v23.11. If you really need to use ACL v23.11, you'll need to use oneDNN main (or v3.4 when it releases) or cherry pick https://github.com/oneapi-src/oneDNN/pull/1761.

We have a minimum ACL version enforced in cmake, and it would probably make sense to add a maximum version too to make this clearer.

jondea avatar Jan 09 '24 09:01 jondea

thanks for your answer. It's enough to understand the version dependencies.

Mchenr avatar Jan 09 '24 09:01 Mchenr