Skip to content

Commit 8c24539

Browse files
Added tests for SyclPlatform.default_context and SyclDevice.platform
1 parent 9cacc0e commit 8c24539

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dpctl/tests/test_sycl_device.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,11 @@ def check_profiling_timer_resolution(device):
496496
assert isinstance(resol, int) and resol > 0
497497

498498

499+
def check_platform(device):
500+
p = device.platform
501+
assert isinstance(p, dpctl.SyclPlatform)
502+
503+
499504
list_of_checks = [
500505
check_get_max_compute_units,
501506
check_get_max_work_item_dims,
@@ -552,6 +557,8 @@ def check_profiling_timer_resolution(device):
552557
check_repr,
553558
check_get_global_mem_size,
554559
check_get_local_mem_size,
560+
check_profiling_timer_resolution,
561+
check_platform,
555562
]
556563

557564

dpctl/tests/test_sycl_platform.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ def check_repr(platform):
8787
assert r != ""
8888

8989

90+
def check_default_context(platform):
91+
r = platform.default_context
92+
assert type(r) is dpctl.SyclContext
93+
94+
9095
list_of_checks = [
9196
check_name,
9297
check_vendor,

0 commit comments

Comments
 (0)