From 5139df1b5f9106024d0a85a72b51e822bfc52e14 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 16 Jan 2023 05:41:31 -0600 Subject: [PATCH 1/3] Set minimum required versions & fix debug building --- dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp | 2 +- dpnp/backend/src/dpnpc_memory_adapter.hpp | 3 +++ dpnp/backend/src/queue_sycl.cpp | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp b/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp index 71d93842feb0..b5a1e788186e 100644 --- a/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp @@ -1,5 +1,5 @@ //***************************************************************************** -// Copyright (c) 2016-2022, Intel Corporation +// Copyright (c) 2016-2023, Intel Corporation // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/dpnp/backend/src/dpnpc_memory_adapter.hpp b/dpnp/backend/src/dpnpc_memory_adapter.hpp index 6c81f5267787..7c561757d8ff 100644 --- a/dpnp/backend/src/dpnpc_memory_adapter.hpp +++ b/dpnp/backend/src/dpnpc_memory_adapter.hpp @@ -30,6 +30,9 @@ #include "queue_sycl.hpp" #include "dpnp_utils.hpp" +static_assert(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_VERSION_REQUIRED, + "The compiler does not meet minimum version requirement"); + /** * @ingroup BACKEND_UTILS * @brief Adapter for the memory given by parameters in the DPNPC functions diff --git a/dpnp/backend/src/queue_sycl.cpp b/dpnp/backend/src/queue_sycl.cpp index 55f78230d64e..d102ae640a10 100644 --- a/dpnp/backend/src/queue_sycl.cpp +++ b/dpnp/backend/src/queue_sycl.cpp @@ -31,6 +31,9 @@ #include "queue_sycl.hpp" #include "dpnp_utils.hpp" +static_assert(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_VERSION_REQUIRED, + "The compiler does not meet minimum version requirement"); + #if defined(DPNP_LOCAL_QUEUE) sycl::queue* backend_sycl::queue = nullptr; #endif From 8368d1c77e0a31bb0d909917bda630f5bd4f9b79 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 20 Jan 2023 13:02:06 -0600 Subject: [PATCH 2/3] Get rid of 'has_aspect_host' property in tests --- dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp | 2 +- dpnp/backend/src/dpnpc_memory_adapter.hpp | 3 --- dpnp/backend/src/queue_sycl.cpp | 3 --- tests/test_sycl_queue.py | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp b/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp index b5a1e788186e..71d93842feb0 100644 --- a/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_arraycreation.cpp @@ -1,5 +1,5 @@ //***************************************************************************** -// Copyright (c) 2016-2023, Intel Corporation +// Copyright (c) 2016-2022, Intel Corporation // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/dpnp/backend/src/dpnpc_memory_adapter.hpp b/dpnp/backend/src/dpnpc_memory_adapter.hpp index 7c561757d8ff..6c81f5267787 100644 --- a/dpnp/backend/src/dpnpc_memory_adapter.hpp +++ b/dpnp/backend/src/dpnpc_memory_adapter.hpp @@ -30,9 +30,6 @@ #include "queue_sycl.hpp" #include "dpnp_utils.hpp" -static_assert(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_VERSION_REQUIRED, - "The compiler does not meet minimum version requirement"); - /** * @ingroup BACKEND_UTILS * @brief Adapter for the memory given by parameters in the DPNPC functions diff --git a/dpnp/backend/src/queue_sycl.cpp b/dpnp/backend/src/queue_sycl.cpp index d102ae640a10..55f78230d64e 100644 --- a/dpnp/backend/src/queue_sycl.cpp +++ b/dpnp/backend/src/queue_sycl.cpp @@ -31,9 +31,6 @@ #include "queue_sycl.hpp" #include "dpnp_utils.hpp" -static_assert(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_VERSION_REQUIRED, - "The compiler does not meet minimum version requirement"); - #if defined(DPNP_LOCAL_QUEUE) sycl::queue* backend_sycl::queue = nullptr; #endif diff --git a/tests/test_sycl_queue.py b/tests/test_sycl_queue.py index 26a71eef2936..723c53f5457f 100644 --- a/tests/test_sycl_queue.py +++ b/tests/test_sycl_queue.py @@ -17,7 +17,7 @@ "cpu", ] -available_devices = [d for d in dpctl.get_devices() if not d.has_aspect_host] +available_devices = [d for d in dpctl.get_devices() if hasattr(d, 'has_aspect_host') and not d.has_aspect_host] valid_devices = [] for device in available_devices: From 85d213974573bfe6179245e4b3ba88052419133b Mon Sep 17 00:00:00 2001 From: Anton <100830759+antonwolfy@users.noreply.github.com> Date: Sat, 21 Jan 2023 00:51:59 +0100 Subject: [PATCH 3/3] Update tests/test_sycl_queue.py Co-authored-by: Oleksandr Pavlyk --- tests/test_sycl_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_sycl_queue.py b/tests/test_sycl_queue.py index 723c53f5457f..977f4561f5a0 100644 --- a/tests/test_sycl_queue.py +++ b/tests/test_sycl_queue.py @@ -17,7 +17,7 @@ "cpu", ] -available_devices = [d for d in dpctl.get_devices() if hasattr(d, 'has_aspect_host') and not d.has_aspect_host] +available_devices = [d for d in dpctl.get_devices() if not getattr(d, 'has_aspect_host', False)] valid_devices = [] for device in available_devices: