We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ec6568 commit 59979c6Copy full SHA for 59979c6
dpctl/tests/test_sycl_platform.py
@@ -92,13 +92,29 @@ def check_default_context(platform):
92
assert type(r) is dpctl.SyclContext
93
94
95
+def check_equal_and_hash(platform):
96
+ assert platform == platform
97
+ default_ctx = platform.default_context
98
+ for d in default_ctx.get_devices():
99
+ assert platform == d.sycl_platform
100
+ assert hash(platform) == hash(d.sycl_platform)
101
+
102
103
+def check_hash_in_dict(platform):
104
+ map = {platform: 0}
105
+ assert map[platform] == 0
106
107
108
list_of_checks = [
109
check_name,
110
check_vendor,
111
check_version,
112
check_backend,
113
check_print_info,
114
check_repr,
115
+ check_default_context,
116
+ check_equal_and_hash,
117
+ check_hash_in_dict,
118
]
119
120
0 commit comments