Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMAKE] Fix warnings in CPU cmake code #28243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ilya-lavrenov
Copy link
Contributor

Details:

Fix the following warnings

CMake Warning at cmake/developer_package/compile_flags/os_flags.cmake:252 (message):
  fp16 is not supported by architecture x86_64
Call Stack (most recent call first):
  cmake/developer_package/cross_compile/cross_compiled_func.cmake:29 (ov_arm_neon_fp16_optimization_flags)
  cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake:261 (include)
  CMakeLists.txt:49 (find_package)


CMake Warning at cmake/developer_package/compile_flags/os_flags.cmake:294 (message):
  SVE is not supported by architecture x86_64
Call Stack (most recent call first):
  cmake/developer_package/cross_compile/cross_compiled_func.cmake:30 (ov_arm_sve_optimization_flags)
  cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake:261 (include)
  CMakeLists.txt:49 (find_package)

@ilya-lavrenov ilya-lavrenov added this to the 2025.0 milestone Jan 2, 2025
@ilya-lavrenov ilya-lavrenov requested review from a team as code owners January 2, 2025 07:26
@github-actions github-actions bot added category: CPU OpenVINO CPU plugin category: build OpenVINO cmake script / infra labels Jan 2, 2025
@@ -306,14 +288,14 @@ cross_compiled_file(${TARGET_NAME}
NAMESPACE ov::Extensions::Cpu::XARCH
)
cross_compiled_file(${TARGET_NAME}
ARCH ${SOFTMAX_ARCH_LIST}
ARCH AVX512F AVX2 NEON_FP16 SVE ANY
Copy link
Contributor

@dmitry-gorokhov dmitry-gorokhov Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With that change in case ENABLE_NEON_FP16=OFF or ENABLE_SVE=OFF dispatch function will still look like:

    if (with_cpu_neon_fp16()) {
        return NEON_FP16::attn_softmax(a, a_dst, scale, alibi, attn_mask, causal_mask, select_nfltmax_at_0, len, total_size, precision, attn_mask_prec, dst_precision);
    }
    if (with_cpu_sve()) {
        return SVE::attn_softmax(a, a_dst, scale, alibi, attn_mask, causal_mask, select_nfltmax_at_0, len, total_size, precision, attn_mask_prec, dst_precision);
    }
    if (true) {
        return ANY::attn_softmax(a, a_dst, scale, alibi, attn_mask, causal_mask, select_nfltmax_at_0, len, total_size, precision, attn_mask_prec, dst_precision);
    }

The only difference is that NEON_FP16::attn_softmax is compiled w/o -march=armv8.2-a+fp16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build OpenVINO cmake script / infra category: CPU OpenVINO CPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants