Skip to content

Commit 6ee5bef

Browse files
committed
Leave is_host() call with old compiler only
1 parent 666f672 commit 6ee5bef

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

dpnp/backend/src/dpnp_utils.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//*****************************************************************************
2-
// Copyright (c) 2016-2020, Intel Corporation
2+
// Copyright (c) 2016-2022, Intel Corporation
33
// All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,13 @@
4040
(__LIBSYCL_MAJOR_VERSION > major) || (__LIBSYCL_MAJOR_VERSION == major and __LIBSYCL_MINOR_VERSION > minor) || \
4141
(__LIBSYCL_MAJOR_VERSION == major and __LIBSYCL_MINOR_VERSION == minor and __LIBSYCL_PATCH_VERSION >= patch)
4242

43+
/**
44+
* Version of SYCL DPC++ 2023 compiler at which transition to SYCL 2020 occurs
45+
*/
46+
#ifndef __SYCL_COMPILER_2023_SWITCHOVER
47+
#define __SYCL_COMPILER_2023_SWITCHOVER 20221020L
48+
#endif
49+
4350
/**
4451
* @defgroup BACKEND_UTILS Backend C++ library utilities
4552
* @{

dpnp/backend/src/dpnpc_memory_adapter.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//*****************************************************************************
2-
// Copyright (c) 2016-2020, Intel Corporation
2+
// Copyright (c) 2016-2022, Intel Corporation
33
// All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
@@ -28,6 +28,7 @@
2828
#define DPNP_MEMORY_ADAPTER_H
2929

3030
#include "queue_sycl.hpp"
31+
#include "dpnp_utils.hpp"
3132

3233
/**
3334
* @ingroup BACKEND_UTILS
@@ -84,7 +85,9 @@ class DPNPC_ptr_adapter final
8485
std::cerr << "\n\t size_in_bytes=" << size_in_bytes;
8586
std::cerr << "\n\t pointer type=" << (long)src_ptr_type;
8687
std::cerr << "\n\t queue inorder=" << queue.is_in_order();
88+
#if __SYCL_COMPILER_VERSION < __SYCL_COMPILER_2023_SWITCHOVER
8789
std::cerr << "\n\t queue is_host=" << queue.is_host();
90+
#endif
8891
std::cerr << "\n\t queue device is_host=" << queue.get_device().is_host();
8992
std::cerr << "\n\t queue device is_cpu=" << queue.get_device().is_cpu();
9093
std::cerr << "\n\t queue device is_gpu=" << queue.get_device().is_gpu();

0 commit comments

Comments
 (0)