ARM-software / ComputeLibrary

The Compute Library is a set of computer vision and machine learning functions optimised for both Arm CPUs and GPUs using SIMD technologies.
MIT License
2.75k stars 767 forks source link

Support compilation for Windows ARM / ARM64 using MSVC #1021

Closed ilya-lavrenov closed 1 year ago

ilya-lavrenov commented 1 year ago

Do you have any plans to support such configuration? Any hints how we can contribute such support to this repo?

morgolock commented 1 year ago

Hi @ilya-lavrenov

Arm Compute Library builds natively on Windows, this is still experimental but you can use the command line to build it. For more details please see https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_3_WoA

We will be delighted to take your contributions, please see https://arm-software.github.io/ComputeLibrary/latest/contribution_guidelines.xhtml#S5_2_how_to_submit_a_patch

A good starting point would be building ACL on WoA and running arm_compute_validation. You may see some tests failing which we need to fix.

Hope this helps.

ilya-lavrenov commented 1 year ago

Hi @morgolock,

In the docs I see:

Windows on ARM(WoA) systems provide compatibility emulating x86 binaries on aarch64. Unfortunately Visual Studio 2022 does not work on aarch64 systems because it's an x86_64bit application and these binaries cannot be exectuted on WoA yet.

Because we cannot use Visual Studio to build Compute Library we have to set up a native standalone toolchain to compile C++ code for arm64 on Windows.

But actually, MSVC is natively available on ARM64 since 17.4 version.

Moreover, I can compile ARM64 code with cl.exe - it's preferable way for most of users. Do you know this path is not enabled in ARM Compute? This path works for at least a year and we compile our project via cmake for ARM64 using cmake -G "Visual Studio 2022" -A ARM64

Using Windows DevKit 2023 users expect to build ARM apps directly using MSVC.

Thanks, Ilya.

morgolock commented 1 year ago

Hi @ilya-lavrenov

We had done the porting work before the the compilers in VS could run natively. At the time, we used a native arm64 clang toolchain to build ACL because iit was faster than the emulated compilers in VS like cl. Please see https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/native-clang-for-windows-on-arm

Hope this helps.

ilya-lavrenov commented 1 year ago

I've tried to build using llvm and native compilation. When I try to use ARM compute static library is my application, I have undefined symbols:

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_s8qs_nhwc_3x3_s1_output2x2_dot_depthfirst_impl(unsigned int, signed char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, signed char *const *)
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_0>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_0>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_s8q_nhwc_3x3_s1_output2x2_dot_depthfirst_impl(unsigned int, signed char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, signed char *const *)
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_1>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_1>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_s8q_nhwc_3x3_s1_output2x2_mla_depthfirst_impl(unsigned int, signed char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, signed char *const *)
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_2>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_2>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_s8q_nhwc_3x3_s2_output2x2_mla_depthfirst_impl(unsigned int, signed char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, signed char *const *)
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_3>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_3>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_s8q_nhwc_5x5_s1_output2x2_mla_depthfirst_impl(unsigned int, signed char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, signed char *const *)
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_4>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_s8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_4>, class arm_conv::depthwise::DepthwiseCommon<signed char, signed char, signed char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8s8u8q_nhwc_3x3_s1_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8s8u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_0>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8s8u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_0>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8s8u8q_nhwc_3x3_s2_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8s8u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_1>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8s8u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_1>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8s8u8q_nhwc_5x5_s1_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, signed char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8s8u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_2>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8s8u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_2>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, signed char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8q_nhwc_3x3_s1_output2x2_dot_depthfirst_impl(unsigned int, unsigned char const *const *, unsigned char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_0>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_0>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8qa_nhwc_3x3_s1_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, unsigned char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_1>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_1>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8qa_nhwc_3x3_s2_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, unsigned char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_2>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_2>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8qa_nhwc_5x5_s1_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, unsigned char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_3>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_3>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8q_nhwc_3x3_s1_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, unsigned char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_4>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_4>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, unsigned char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_5>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_5>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void __cdecl arm_conv::depthwise::a64_u8q_nhwc_5x5_s1_output2x2_mla_depthfirst_impl(unsigned int, unsigned char const *const *, unsigned char const *, int const *, struct arm_gemm::Requantize32 const &, int const *, int const *, unsigned char *const *)
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_6>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))
>>> referenced by arm_compute-static.lib(depthwise_u8q.obj):(private: virtual class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> * __cdecl std::_Func_impl_no_alloc<class arm_conv::depthwise::<lambda_6>, class arm_conv::depthwise::DepthwiseCommon<unsigned char, unsigned char, unsigned char> *, struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &>::_Do_call(struct arm_conv::depthwise::DepthwiseArgs const &, struct arm_gemm::Requantize32 const &))

lld-link: error: undefined symbol: void * __cdecl arm_conv::winograd::weight_transform::arm_fp32_4x4_3x3(unsigned int, float const *, unsigned __int64, unsigned __int64, float *, unsigned __int64)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)

lld-link: error: undefined symbol: void * __cdecl arm_conv::winograd::weight_transform::arm_fp32_2x2_3x3(unsigned int, float const *, unsigned __int64, unsigned __int64, float *, unsigned __int64)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)

lld-link: error: undefined symbol: void * __cdecl arm_conv::winograd::weight_transform::arm_fp32_2x2_5x5(unsigned int, float const *, unsigned __int64, unsigned __int64, float *, unsigned __int64)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)

lld-link: error: undefined symbol: void * __cdecl arm_conv::winograd::weight_transform::cpp_fp32_1x6_1x3(unsigned int, float const *, unsigned __int64, unsigned __int64, float *, unsigned __int64)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)

lld-link: error: undefined symbol: void * __cdecl arm_conv::winograd::weight_transform::cpp_fp32_1x4_1x5(unsigned int, float const *, unsigned __int64, unsigned __int64, float *, unsigned __int64)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)
>>> referenced by arm_compute-static.lib(weight_transforms_fp32.obj):(_GLOBAL__sub_I_weight_transforms_fp32.cpp)

Any ideas how to resolve this or why does it happen?

morgolock commented 1 year ago

Hi @ilya-lavrenov

You need these two fixes

  1. https://review.mlplatform.org/c/ml/ComputeLibrary/+/9040
  2. https://review.mlplatform.org/c/ml/ComputeLibrary/+/9056

Hope this helps

ilya-lavrenov commented 1 year ago

Thanks @morgolock I did the same changes before you've pasted the links and run our tests - all passed as on Linux or macOS. Am I right that in 2-3 weeks ARM Compute Library on github will be updated to v23.02 and will contain all these fixes?

morgolock commented 1 year ago

Hi @ilya-lavrenov

That's right, these two fixes will be included in v23.02.

morgolock commented 1 year ago

Hi @ilya-lavrenov

Out of curiosity, what device and Windows version did you use to run the tests?

ilya-lavrenov commented 1 year ago

Out of curiosity, what device and Windows version did you use to run the tests?

https://developer.qualcomm.com/hardware/windows-on-snapdragon/windows-dev-kit-2023

ilya-lavrenov commented 1 year ago

@morgolock do you think together with 23.02 release ARM Compute can provide prebuilt binaries for Windows?

morgolock commented 1 year ago

Hi @ilya-lavrenov

Not for 23.02.

I'll discuss it with the team to see if we can do it for 23.05

ilya-lavrenov commented 1 year ago

FYI, we are compiling with -Walland see the following warnings:

src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4844,34): warning : value size does not match register size specified by the constraint and modifier [-Wasm-opera
nd-widths] [C:\Users\sandye51\Documents\Programming\build\openvino-release\build-modules\arm_plugin\thirdparty\arm_compute_static_libs.vcxproj]
                      : [lda] "r" (ldab), [ldc] "r" (ldcb)
                                   ^
  src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4134,42): note: use constraint modifier "w"
                      "add a_ptr4, a_ptr3, %[lda]\n"
                                           ^~~~~~
                                           %w[lda]
src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4844,52): warning : value size does not match register size specified by the constraint and modifier [-Wasm-opera
nd-widths] [C:\Users\sandye51\Documents\Programming\build\openvino-release\build-modules\arm_plugin\thirdparty\arm_compute_static_libs.vcxproj]
                      : [lda] "r" (ldab), [ldc] "r" (ldcb)
                                                     ^
  src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4135,42): note: use constraint modifier "w"
                      "add c_ptr4, c_ptr3, %[ldc]\n"
                                           ^~~~~~
                                           %w[ldc]
src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4844,34): warning : value size does not match register size specified by the constraint and modifier [-Wasm-opera
nd-widths] [C:\Users\sandye51\Documents\Programming\build\openvino-release\build-modules\arm_plugin\thirdparty\arm_compute_static_libs.vcxproj]
                      : [lda] "r" (ldab), [ldc] "r" (ldcb)
                                   ^
  src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4136,42): note: use constraint modifier "w"
                      "add a_ptr5, a_ptr4, %[lda]\n"
                                           ^~~~~~
                                           %w[lda]
src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4844,52): warning : value size does not match register size specified by the constraint and modifier [-Wasm-opera
nd-widths] [C:\Users\sandye51\Documents\Programming\build\openvino-release\build-modules\arm_plugin\thirdparty\arm_compute_static_libs.vcxproj]
                      : [lda] "r" (ldab), [ldc] "r" (ldcb)
                                                     ^
  src\core\NEON\kernels\arm_gemm\kernels\a64_smallK_hybrid_u8u32_dot_6x4\a55.cpp(4137,42): note: use constraint modifier "w"
                      "add c_ptr5, c_ptr4, %[ldc]\n"
                                           ^~~~~~
                                           %w[ldc]
morgolock commented 1 year ago

Hi @ilya-lavrenov

Thanks for reporting this, we were already aware of these warnings and we'll try to fix it in 23.05

morgolock commented 1 year ago

Closing this because ACL can be built natively on WoA using Clang 15 from https://github.com/llvm/llvm-project/releases/

For more details please see https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_3_WoA

Presently due to limitations in MSVC, ACL cannot be built using cl

If you experience any new problems with the windows native build please open a new issues.