From 4537089a5cd17e49f5bb8d5e7f8374e451872387 Mon Sep 17 00:00:00 2001 From: David Svantesson Date: Wed, 22 Feb 2023 11:08:57 +0000 Subject: Fixes for CMake and Bazel builds, tests failing in scons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix 4 failing tests for multi_isa builds when experimental_fixed_format_kernels=1 - Fixes for CMake and Bazel builds to pass validation tests - Update documentation, remove “-DCPPTHREADS=1” flag from CMake build example Partially resolves: ONCPUML-1181 Signed-off-by: David Svantesson Change-Id: I7101676260a0adcb7b6ff6f4342ae36f921e7120 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9189 Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- tests/BUILD.bazel | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 6 deletions(-) (limited to 'tests/BUILD.bazel') diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 57ea3f6576..8122652991 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -35,8 +35,23 @@ cc_library( "validation/**/*.h", ]), copts = [ - "-march=armv8.2-a+fp16", - ], + "-march=armv8.2-a+fp16", + ] + select({ + "//:debug_flag": [ + "-O0", + "-g", + "-gdwarf-2", + ], + "//conditions:default": ["-O3"], + }) + + select({ + "//:openmp_flag": ["-fopenmp"], + "//conditions:default": [], + }) + + select({ + "//:Werror_flag": ["-Werror"], + "//conditions:default": [], + }), linkstatic = True, deps = [ "//:arm_compute", @@ -60,9 +75,23 @@ cc_binary( "instruments/*.h", ]), copts = [ - "-march=armv8.2-a+fp16", - "-ffp-contract=off", - ], + "-march=armv8.2-a+fp16", + ] + select({ + "//:debug_flag": [ + "-O0", + "-g", + "-gdwarf-2", + ], + "//conditions:default": ["-O3"], + }) + + select({ + "//:openmp_flag": ["-fopenmp"], + "//conditions:default": [], + }) + + select({ + "//:Werror_flag": ["-Werror"], + "//conditions:default": [], + }), linkstatic = True, deps = [ ":validation_framework", @@ -71,6 +100,13 @@ cc_binary( "//:common_defines", "//tests/framework", ], + local_defines = [] + + select({ + "//:bf16_validation_flag": [ + "ARM_COMPUTE_ENABLE_BF16", + ], + "//conditions:default": [], + }) ) #--------------------------------------------------------------------- @@ -82,7 +118,24 @@ cc_binary( "benchmark/NEON/*.cpp", "*.cpp", ]), - copts = ["-march=armv8.2-a+fp16"], + copts = [ + "-march=armv8.2-a+fp16", + ] + select({ + "//:debug_flag": [ + "-O0", + "-g", + "-gdwarf-2", + ], + "//conditions:default": ["-O3"], + }) + + select({ + "//:openmp_flag": ["-fopenmp"], + "//conditions:default": [], + }) + + select({ + "//:Werror_flag": ["-Werror"], + "//conditions:default": [], + }), linkstatic = True, deps = [ ":arm_compute_validation", -- cgit v1.2.1