Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions reframe/frontend/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ def _fn(case):

def have_gpu_only():
def _fn(case):
return case.check.num_gpus_per_node > 0
# NOTE: This takes into account num_gpus_per_node being None
return case.check.num_gpus_per_node

return _fn


def have_cpu_only():
def _fn(case):
return case.check.num_gpus_per_node == 0
# NOTE: This takes into account num_gpus_per_node being None
return not case.check.num_gpus_per_node

return _fn
1 change: 0 additions & 1 deletion unittests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class _X(rfm.RegressionTest):
maintainers=['A', 'B', 'C', 'D']),
make_case(_X, alt_name='check2',
tags={'x', 'y', 'z'},
num_gpus_per_node=0,
maintainers=['X', 'Y', 'Z']),
make_case(_X, alt_name='check3',
tags={'a', 'z'},
Expand Down