Skip to content

Commit

Permalink
Mark the cache/perf counter experiments as x86-64/Linux only. (#23)
Browse files Browse the repository at this point in the history
Mark the cache/perf counter experiments as x86-64/Linux only.

* The experimental code depends on x86-64 specific intrinsics, and breaks the
build on Apple silicon and other non-x86 platforms.
* The perf counter access via the benchmark tool is Linux-specific.
  • Loading branch information
ondrasej authored Oct 21, 2023
1 parent 4e33169 commit 320584f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions gematria/experiments/access_pattern_bm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ cc_library(
srcs = ["linked_list.cc"],
hdrs = ["linked_list.h"],
copts = FEATURE_OPTS,
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
],
)

cc_test(
Expand All @@ -49,6 +53,10 @@ cc_library(
srcs = ["contiguous_matrix.cc"],
hdrs = ["contiguous_matrix.h"],
copts = FEATURE_OPTS,
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
],
deps = ["@com_google_absl//absl/base:core_headers"],
)

Expand All @@ -72,6 +80,10 @@ cc_library(
srcs = ["vec_of_vec_matrix.cc"],
hdrs = ["vec_of_vec_matrix.h"],
copts = FEATURE_OPTS,
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
],
deps = ["@com_google_absl//absl/base:core_headers"],
)

Expand Down Expand Up @@ -99,6 +111,10 @@ cc_test(
"stl_container_test.cc",
],
copts = BALANCE_FLUSHING_TIME_OPTS + FEATURE_OPTS, # Since templated functions using _mm_clflushopt are defined in the header.
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
],
deps = [
"@com_github_google_benchmark//:benchmark_main",
],
Expand All @@ -113,6 +129,10 @@ cc_test(
"stl_assoc_container_test.cc",
],
copts = BALANCE_FLUSHING_TIME_OPTS + FEATURE_OPTS, # Since templated functions using _mm_clflushopt are defined in the header.
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
],
deps = [
"@com_github_google_benchmark//:benchmark_main",
],
Expand Down

0 comments on commit 320584f

Please sign in to comment.