Skip to content

Commit 88abbba

Browse files
author
Diptorup Deb
committed
Black formatting.
1 parent 250c413 commit 88abbba

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

dpctl/tests/test_sycl_device.py

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,18 @@ def check_get_max_compute_units(device):
5757
max_compute_units = device.get_max_compute_units()
5858
assert max_compute_units > 0
5959

60+
6061
def check_get_max_work_item_dims(device):
6162
max_work_item_dims = device.get_max_work_item_dims()
6263
assert max_work_item_dims > 0
6364

65+
6466
def check_get_max_work_item_sizes(device):
6567
max_work_item_sizes = device.get_max_work_item_sizes()
6668
for size in max_work_item_sizes:
6769
assert size is not None
6870

71+
6972
def check_get_max_work_group_size(device):
7073
max_work_group_size = device.get_max_work_group_size()
7174
# Special case for FPGA simulator
@@ -74,6 +77,7 @@ def check_get_max_work_group_size(device):
7477
else:
7578
assert max_work_group_size > 0
7679

80+
7781
def check_get_max_num_sub_groups(device):
7882
max_num_sub_groups = device.get_max_num_sub_groups()
7983
# Special case for FPGA simulator
@@ -82,56 +86,64 @@ def check_get_max_num_sub_groups(device):
8286
else:
8387
assert max_num_sub_groups > 0
8488

89+
8590
def check_has_int64_base_atomics(device):
8691
try:
8792
device.has_int64_base_atomics()
8893
except Exception:
8994
pytest.fail("has_int64_base_atomics call failed")
9095

96+
9197
def check_has_int64_extended_atomics(device):
9298
try:
9399
device.has_int64_extended_atomics()
94100
except Exception:
95101
pytest.fail("has_int64_extended_atomics call failed")
96102

103+
97104
def check_is_accelerator(device):
98105
try:
99106
device.is_accelerator()
100107
except Exception:
101108
pytest.fail("is_accelerator call failed")
102109

110+
103111
def check_is_cpu(device):
104112
try:
105113
device.is_cpu()
106114
except Exception:
107115
pytest.fail("is_cpu call failed")
108116

117+
109118
def check_is_gpu(device):
110119
try:
111120
device.is_gpu()
112121
except Exception:
113122
pytest.fail("is_gpu call failed")
114123

124+
115125
def check_is_host(device):
116126
try:
117127
device.is_host()
118128
except Exception:
119129
pytest.fail("is_hostcall failed")
120130

131+
121132
list_of_checks = [
122-
check_get_max_compute_units,
123-
check_get_max_work_item_dims,
124-
check_get_max_work_item_sizes,
125-
check_get_max_work_group_size,
126-
check_get_max_num_sub_groups,
127-
check_has_int64_base_atomics,
128-
check_has_int64_extended_atomics,
129-
check_is_accelerator,
130-
check_is_cpu,
131-
check_is_gpu,
132-
check_is_host,
133+
check_get_max_compute_units,
134+
check_get_max_work_item_dims,
135+
check_get_max_work_item_sizes,
136+
check_get_max_work_group_size,
137+
check_get_max_num_sub_groups,
138+
check_has_int64_base_atomics,
139+
check_has_int64_extended_atomics,
140+
check_is_accelerator,
141+
check_is_cpu,
142+
check_is_gpu,
143+
check_is_host,
133144
]
134145

146+
135147
@pytest.fixture(params=list_of_valid_filter_selectors)
136148
def valid_filter(request):
137149
return request.param
@@ -146,6 +158,7 @@ def invalid_filter(request):
146158
def device_selector(request):
147159
return request.param
148160

161+
149162
@pytest.fixture(params=list_of_checks)
150163
def check(request):
151164
return request.param

0 commit comments

Comments
 (0)