Skip to content

Commit 20ef067

Browse files
committed
Address remaining Copilot PR comments
1 parent 804b803 commit 20ef067

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

dev/bazel/release.bzl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ load("@onedal//dev/bazel:utils.bzl", "utils", "paths")
1818
load("@onedal//dev/bazel:cc.bzl", "ModuleInfo")
1919
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
2020

21-
# Transition: force --cpu=all when building release libs,
22-
# unless --cpu is explicitly overridden (e.g. --cpu=avx2 in CI).
23-
# This ensures bazel build //:release compiles all ISA variants
24-
# (sse2, sse42, avx2, avx512) by default without any extra flags.
21+
# Transition: force --cpu=all when building release libs and headers.
22+
# This ensures `bazel build //:release` compiles all ISA variants
23+
# (sse2, sse42, avx2, avx512) by default without extra flags.
24+
# Note: Bazel does not distinguish between an unset `--cpu` and an
25+
# explicit `--cpu=auto`. In both cases, this transition forces `all`.
26+
# Explicit non-auto overrides (e.g. `--cpu=avx2`) are respected.
2527
def _release_cpu_all_impl(settings, attr):
2628
current = settings["@config//:cpu"]
2729
# Respect explicit --cpu flag; only force "all" for the default "auto".

dev/bazel/tests/isa_coverage_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ check_isa() {
4242
local cpu_type="$1" # e.g. CpuTypeE2
4343
local isa_name="$2" # e.g. sse42
4444
local count
45-
count=$(nm -D "${LIB}" | grep -c "${cpu_type}" || true)
45+
count=$(nm -D --defined-only "${LIB}" | grep -c "${cpu_type}" || true)
4646
if [[ "${count}" -gt 0 ]]; then
4747
echo " OK ${isa_name} (${cpu_type}): ${count} dispatch symbols"
4848
PASS=$((PASS + 1))

0 commit comments

Comments
 (0)