Skip to content

The additional compiler flags were added for CI consistency.#13281

Closed
OleksiiZaderykhinCapgemini wants to merge 1 commit into
openvinotoolkit:masterfrom
OleksiiZaderykhinCapgemini:cpu_plugin_ci_consistency
Closed

The additional compiler flags were added for CI consistency.#13281
OleksiiZaderykhinCapgemini wants to merge 1 commit into
openvinotoolkit:masterfrom
OleksiiZaderykhinCapgemini:cpu_plugin_ci_consistency

Conversation

@OleksiiZaderykhinCapgemini
Copy link
Copy Markdown
Contributor

The build_macos_release CI check has additional compiler flags. These flags were added for the GNUCC compiler also. So building errors on this CI check could be detected on the ubuntu environment also.

…flags were added for GNUCC compiler also. So building errors on this CI check could be detected on ubuntu environment also.
@ilya-lavrenov
Copy link
Copy Markdown
Contributor

The build_macos_release CI check has additional compiler flags

Please, provide info where have you seen it..


if(CMAKE_COMPILER_IS_GNUCC)
ie_add_compiler_flags(-Wno-all)
ie_add_compiler_flags(-Wno-all -Werror -Wundef -Wreturn-type -Wunused-variable -Wunused-value -Wswitch -Wformat -Wformat-security)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not to just fix -Wall ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

why not to just fix -Wall ?

With -Wall the project will not compile. There will be errors related to the -Werror=sign-compare and -Werror=reorder flags that are not set in other build configurations and CI checks.

@OleksiiZaderykhinCapgemini
Copy link
Copy Markdown
Contributor Author

The build_macos_release CI check has additional compiler flags

Please, provide info where have you seen it..

Hi @ilya-lavrenov, I saw it while preparing the PR. I use Ubuntu 18.04 environment for development and have no build errors there, but there were errors on build_macos_release CI check. There were logs like the next.

[2022-09-28T05:20:37.013Z] [ 80%] Building CXX object src/core/tests/CMakeFiles/ov_core_unit_tests.dir/node_input_output.cpp.o
[2022-09-28T05:20:37.013Z] cd /Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/build/dldt/src/core/tests && ccache /Library/Developer/CommandLineTools/usr/bin/clang++ -DENABLE_GAPI_PREPROCESSING -DENABLE_INTEL_CPU=1 -DENABLE_INTEL_MYRIAD=1 -DENABLE_OV_ONNX_FRONTEND -DIE_BUILD_POSTFIX=\"\" -DIE_THREAD=IE_THREAD_TBB -DPROJECT_ROOT_DIR=\"/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src\" -DSERIALIZED_ZOO=\"./test_model_zoo/core/models\" -DSHARED_LIB_PREFIX=\"lib\" -DSHARED_LIB_SUFFIX=\".dylib\" -DTBB_PREVIEW_WAITING_FOR_WORKERS=1 -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/tests -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/src -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/tests/engines_util -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/tests/engines_util/.. -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/frontends/common/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/inference/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/inference/include/ie -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/common/transformations/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/dev_api -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/inference/dev_api -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/common/low_precision_transformations/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/common/preprocessing -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/common/itt/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/common/util/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/thirdparty/gtest/gtest/googlemock -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/tests/util -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/tests/util/.. -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/tests/ngraph_helpers/ngraph_functions/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/reference/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/docs/template_plugin/backend -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/builder/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/shape_inference/include -I/Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/common/conditional_compilation/include -isystem /Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/dependencies/tbb/include -isystem /Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/thirdparty/gtest/gtest/googletest/include -isystem /Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/thirdparty/gtest/gtest/googletest -isystem /Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/thirdparty/gtest/gtest/googlemock/include -isystem /Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/tests/ie_test_utils -fsigned-char -Werror -ffunction-sections -fdata-sections -fdiagnostics-show-option -Wundef -Wreturn-type -Wunused-variable -Wswitch -O3 -DNDEBUG  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-all -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.12 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wno-undef -Wno-reserved-id-macro -std=c++11 -MD -MT src/core/tests/CMakeFiles/ov_core_unit_tests.dir/node_input_output.cpp.o -MF CMakeFiles/ov_core_unit_tests.dir/node_input_output.cpp.o.d -o CMakeFiles/ov_core_unit_tests.dir/node_input_output.cpp.o -c /Users/sys_k8sworker/workspace/private-ci/ie/build-linux-macos/b/repos/openvino/src/core/tests/node_input_output.cpp
[2022-09-28T05:20:37.013Z] In file included from ../../../../../../../repos/openvino/src/plugins/intel_cpu/tests/unit/registers_pool.cpp:6:
[2022-09-28T05:20:37.013Z] ../../../../../../../repos/openvino/src/plugins/intel_cpu/src/nodes/kernels/registers_pool.hpp:323:13: error: 11 enumeration values not handled in switch: 'isa_any', 'amx_tile', 'amx_int8'... [-Werror,-Wswitch]
[2022-09-28T05:20:37.013Z]     switch (isa) {
[2022-09-28T05:20:37.013Z]             ^
[2022-09-28T05:20:37.013Z] ../../../../../../../repos/openvino/src/plugins/intel_cpu/src/nodes/kernels/registers_pool.hpp:323:13: note: add missing switch cases
[2022-09-28T05:20:37.013Z]     switch (isa) {
[2022-09-28T05:20:37.013Z]             ^
[2022-09-28T05:20:37.013Z] ../../../../../../../repos/openvino/src/plugins/intel_cpu/tests/unit/registers_pool.cpp:215:25: error: expression result unused [-Werror,-Wunused-value]
[2022-09-28T05:20:37.013Z]         ASSERT_NO_THROW(static_cast<Xbyak::Xmm &>(reg));
[2022-09-28T05:20:37.013Z]                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here you could see these additional flags (see the second line).
And after adding these additional flags I could reproduce such errors in my environment.

Copy link
Copy Markdown
Contributor

@lohika-denis-kotov lohika-denis-kotov left a comment

Choose a reason for hiding this comment

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

LGTM

@ilya-lavrenov ilya-lavrenov added the ExternalPR External contributor label Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: CI OpenVINO public CI category: CPU OpenVINO CPU plugin ExternalPR External contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants