Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.

SYCL attributes ignored

vincent_
Novice
267 Views

I get compiling warnings telling me sycl_kernel and sycl_special_class attributes where ignored while compiling a SYCL application with DPC++ using a different host compiler (following instructions from https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/use-third-party-compiler-as-host-compiler-dpc-code.html

"""

In file included from vector_add_no_tasycl.cpp:11:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl.hpp:16:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/backend.hpp:18:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/backend_traits_opencl.hpp:26:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/queue.hpp:20:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/handler.hpp:14:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/cg.hpp:27:
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/cg_types.hpp:234:32: warning: 'interop_handler' is deprecated: interop_handler class is deprecated, use interop_handle instead with host-task [-Wdeprecated-declarations]
std::function<void(cl::sycl::interop_handler)> MFunc;
^
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/interop_handler.hpp:18:7: note: 'interop_handler' has been explicitly marked deprecated here
class __SYCL_DEPRECATED("interop_handler class is deprecated, use"
^
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/defines_elementary.hpp:45:38: note: expanded from macro '__SYCL_DEPRECATED'
#define __SYCL_DEPRECATED(message) [[deprecated(message)]]
^
In file included from vector_add_no_tasycl.cpp:11:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl.hpp:16:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/backend.hpp:18:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/backend_traits_opencl.hpp:26:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/queue.hpp:20:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/handler.hpp:14:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/cg.hpp:27:
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/cg_types.hpp:237:44: warning: 'interop_handler' is deprecated: interop_handler class is deprecated, use interop_handle instead with host-task [-Wdeprecated-declarations]
InteropTask(std::function<void(cl::sycl::interop_handler)> Func)
^
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/interop_handler.hpp:18:7: note: 'interop_handler' has been explicitly marked deprecated here
class __SYCL_DEPRECATED("interop_handler class is deprecated, use"
^
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/defines_elementary.hpp:45:38: note: expanded from macro '__SYCL_DEPRECATED'
#define __SYCL_DEPRECATED(message) [[deprecated(message)]]
^
In file included from vector_add_no_tasycl.cpp:11:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl.hpp:16:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/backend.hpp:18:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/backend_traits_opencl.hpp:26:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/queue.hpp:20:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/handler.hpp:14:
In file included from /apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/cg.hpp:27:
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/cg_types.hpp:239:23: warning: 'interop_handler' is deprecated: interop_handler class is deprecated, use interop_handle instead with host-task [-Wdeprecated-declarations]
void call(cl::sycl::interop_handler &h) { MFunc(h); }
^
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/interop_handler.hpp:18:7: note: 'interop_handler' has been explicitly marked deprecated here
class __SYCL_DEPRECATED("interop_handler class is deprecated, use"
^
/apps/ONEAPI/2022.3.0.8767/compiler/2022.2.0/linux/include/sycl/CL/sycl/detail/defines_elementary.hpp:45:38: note: expanded from macro '__SYCL_DEPRECATED'
#define __SYCL_DEPRECATED(message) [[deprecated(message)]]
^
3 warnings generated.

"""

 

The host compiler is of version clang 16, so it should support both sycl_kernel and sycl_special_class attributes.

The compilation works and the program runs without errors.

I am wondering whether this should happen, a possible way to make compiler not ignore said attributes, and what consequences it may entail when sycl clang attributes are ignored.

Any help or guidance is great appreciated!

0 Kudos
0 Replies
Reply