Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
Created using spr 1.3.4
  • Loading branch information
boomanaiden154 committed Dec 31, 2024
2 parents 4c1b6cf + e875be9 commit 373e41d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gematria/datasets/pipelines/benchmark_cpu_scheduler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ def test_default_scheduler_get_cores(self):

def test_default_scheduler_get_cores_no_neighboring_threads(self):
cpu_mask = os.sched_getaffinity(0)

# If we have less than five CPUs, that means we are guaranteed to get
# a pair when selecting three of them. Skip this test in those
# instances.
if len(cpu_mask) < 5:
self.skipTest('Not enough cores to complete setup properly.')

three_cores = [cpu_mask.pop(), cpu_mask.pop(), cpu_mask.pop()]

scheduler = benchmark_cpu_scheduler.DefaultBenchmarkScheduler()
Expand Down

0 comments on commit 373e41d

Please sign in to comment.