From f2b70e5948fc0f25bbb162c0593455fee5adc063 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Sun, 8 Oct 2023 23:23:54 +0400 Subject: [PATCH] Enabled warnings as errors for static Ubuntu 22.04 (#20302) --- .github/workflows/linux_conditional_compilation.yml | 2 +- .github/workflows/linux_riscv.yml | 3 --- cmake/features.cmake | 9 ++++++++- src/plugins/intel_gna/src/frontend/quantization.cpp | 2 -- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.yml index dc63843d5ce..b8567d57a6a 100644 --- a/.github/workflows/linux_conditional_compilation.yml +++ b/.github/workflows/linux_conditional_compilation.yml @@ -124,7 +124,7 @@ jobs: -DENABLE_CPPLINT=OFF \ -DENABLE_NCC_STYLE=OFF \ -DENABLE_INTEL_GNA=OFF \ - -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ + -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ -DENABLE_PROFILING_ITT=ON \ -DSELECTIVE_BUILD=COLLECT \ -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ diff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.yml index 3899b454054..927b10ea801 100644 --- a/.github/workflows/linux_riscv.yml +++ b/.github/workflows/linux_riscv.yml @@ -85,7 +85,6 @@ jobs: python3 -m venv ${OPENVINO_BUILD_DIR}/env source ${OPENVINO_BUILD_DIR}/env/bin/activate - python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/requirements.txt python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt python3 -m pip install conan @@ -151,9 +150,7 @@ jobs: -DPYTHON_MODULE_EXTENSION=$(riscv64-linux-gnu-python3-config --extension-suffix) \ -DPYBIND11_PYTHON_EXECUTABLE_LAST=${OPENVINO_BUILD_DIR}/env/bin/python3.10 \ -DENABLE_TESTS=ON \ - -DTHREADING=SEQ \ -DENABLE_PYTHON_PACKAGING=ON \ - -DENABLE_SYSTEM_TBB=ON \ -DENABLE_SYSTEM_PROTOBUF=ON \ -DENABLE_SYSTEM_SNAPPY=ON \ -DENABLE_SYSTEM_PUGIXML=ON \ diff --git a/cmake/features.cmake b/cmake/features.cmake index 7b11a8a968f..01a219e0aaf 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -73,7 +73,14 @@ ie_dependent_option (ENABLE_PKGCONFIG_GEN "Enable openvino.pc pkg-config file ge # # "OneDNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ" -set(THREADING "TBB" CACHE STRING "Threading") +if(RISCV64) + # oneDNN does not support non-SEQ for RISC-V architecture + set(THREADING_DEFAULT "SEQ") +else() + set(THREADING_DEFAULT "TBB") +endif() + +set(THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading") set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ") list (APPEND IE_OPTIONS THREADING) if (NOT THREADING STREQUAL "TBB" AND diff --git a/src/plugins/intel_gna/src/frontend/quantization.cpp b/src/plugins/intel_gna/src/frontend/quantization.cpp index 4bcadfec5f7..deb8663801a 100644 --- a/src/plugins/intel_gna/src/frontend/quantization.cpp +++ b/src/plugins/intel_gna/src/frontend/quantization.cpp @@ -93,7 +93,6 @@ void QuantizeWeights(const QuantizationData& data, auto output_low = 0.0f; auto output_high = 0.0f; uint32_t levels = 1; - float valueAcc = 0.0f; const auto min_values_size = data.weights_quant_params.GetMinValues().size(); if (min_values_size > 0) { @@ -121,7 +120,6 @@ void QuantizeWeights(const QuantizationData& data, float scaled_row_max = 0; for (size_t col = 0; col < data.num_columns; col++) { float value = ptr_float_weights[row * data.num_columns + col] * data.scale_factor; - valueAcc += value; if (fabs(value) > scaled_row_max) { scaled_row_max = fabs(value); }