Skip to content

Commit 5f6a98b

Browse files
committed
Add logging of default device ID where the tests are running
1 parent 39d5dc8 commit 5f6a98b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dpnp/tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def pytest_collection_modifyitems(config, items):
129129
test_exclude_file_cuda = os.path.join(test_path, "skipped_tests_cuda.tbl")
130130

131131
dev = dpctl.select_default_device()
132+
dev_id = dpctl.utils.intel_device_info(dev).get("device_id", 0)
132133
is_cpu = dev.is_cpu
133134
is_gpu = dev.is_gpu
134135
support_fp64 = dev.has_aspect_fp64
@@ -138,6 +139,7 @@ def pytest_collection_modifyitems(config, items):
138139
print(
139140
f"DPNP Test scope includes all integer dtypes: {bool(dtype_config.all_int_types)}"
140141
)
142+
print(f"DPNP current device ID: {dev_id}")
141143
print(f"DPNP current device is CPU: {is_cpu}")
142144
print(f"DPNP current device is GPU: {is_gpu}")
143145
print(f"DPNP current device supports fp64: {support_fp64}")

0 commit comments

Comments
 (0)