Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_D
Beginner
78 Views

issues to compile cpp code that uses cuda header

Hi,

I try to compile a souce file that includes the "driver_types.h" header file from the latest cuda sdk. I get thisd error when I use the oneAPI c++ compiler:

1>In file included from C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl.hpp:11:
1>In file included from C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/ONEAPI/atomic.hpp:11:
1>In file included from C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/ONEAPI/atomic_accessor.hpp:11:
1>In file included from C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/ONEAPI/atomic_enums.hpp:12:
1>In file included from C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/access/access.hpp:10:
1>In file included from C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/common.hpp:121:
1>In file included from C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/exception.hpp:15:
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(234,7): : error : use of undeclared identifier 'CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES'
1> CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(235,45): : error : use of undeclared identifier 'CL_DEVICE_QUEUE_ON_HOST_PROPERTIES'
1> PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES = CL_DEVICE_QUEUE_ON_HOST_PROPERTIES,

 

and there is also a list of underfined identifiers:

 

 1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(234,7): : error : use of undeclared identifier 'CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES'
1> CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(235,45): : error : use of undeclared identifier 'CL_DEVICE_QUEUE_ON_HOST_PROPERTIES'
1> PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES = CL_DEVICE_QUEUE_ON_HOST_PROPERTIES,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(239,31): : error : use of undeclared identifier 'CL_DEVICE_IL_VERSION_KHR'
1> PI_DEVICE_INFO_IL_VERSION = CL_DEVICE_IL_VERSION_KHR,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(257,39): : error : use of undeclared identifier 'CL_DEVICE_MAX_NUM_SUB_GROUPS'
1> PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS = CL_DEVICE_MAX_NUM_SUB_GROUPS,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(259,7): : error : use of undeclared identifier 'CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS'
1> CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(301,34): : error : use of undeclared identifier 'CL_QUEUE_DEVICE_DEFAULT'
1> PI_QUEUE_INFO_DEVICE_DEFAULT = CL_QUEUE_DEVICE_DEFAULT,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(304,24): : error : use of undeclared identifier 'CL_QUEUE_SIZE'
1> PI_QUEUE_INFO_SIZE = CL_QUEUE_SIZE
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(348,34): : error : use of undeclared identifier 'CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE'
1> PI_KERNEL_MAX_SUB_GROUP_SIZE = CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(349,34): : error : use of undeclared identifier 'CL_KERNEL_MAX_NUM_SUB_GROUPS'; did you mean 'PI_KERNEL_MAX_SUB_GROUP_SIZE'?
1> PI_KERNEL_MAX_NUM_SUB_GROUPS = CL_KERNEL_MAX_NUM_SUB_GROUPS,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(348,3): note: 'PI_KERNEL_MAX_SUB_GROUP_SIZE' declared here
1> PI_KERNEL_MAX_SUB_GROUP_SIZE = CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(350,38): : error : use of undeclared identifier 'CL_KERNEL_COMPILE_NUM_SUB_GROUPS'; did you mean 'PI_KERNEL_MAX_NUM_SUB_GROUPS'?
1> PI_KERNEL_COMPILE_NUM_SUB_GROUPS = CL_KERNEL_COMPILE_NUM_SUB_GROUPS,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(349,3): note: 'PI_KERNEL_MAX_NUM_SUB_GROUPS' declared here
1> PI_KERNEL_MAX_NUM_SUB_GROUPS = CL_KERNEL_MAX_NUM_SUB_GROUPS,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(388,30): : error : use of undeclared identifier 'CL_COMMAND_SVM_FREE'
1> PI_COMMAND_TYPE_SVM_FREE = CL_COMMAND_SVM_FREE,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(389,32): : error : use of undeclared identifier 'CL_COMMAND_SVM_MEMCPY'
1> PI_COMMAND_TYPE_SVM_MEMCPY = CL_COMMAND_SVM_MEMCPY,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(390,33): : error : use of undeclared identifier 'CL_COMMAND_SVM_MEMFILL'
1> PI_COMMAND_TYPE_SVM_MEMFILL = CL_COMMAND_SVM_MEMFILL,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(391,29): : error : use of undeclared identifier 'CL_COMMAND_SVM_MAP'
1> PI_COMMAND_TYPE_SVM_MAP = CL_COMMAND_SVM_MAP,
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(392,31): : error : use of undeclared identifier 'CL_COMMAND_SVM_UNMAP'
1> PI_COMMAND_TYPE_SVM_UNMAP = CL_COMMAND_SVM_UNMAP
1> ^
1>C:\PROGRA~2\Intel\oneAPI\compiler\20212~1.0\windows\bin\..\include\sycl\CL/sycl/detail/pi.h(419,33): : error : use of undeclared identifier 'CL_ABGR'
1> PI_IMAGE_CHANNEL_ORDER_ABGR = CL_ABGR,

 

and more.....

 

Any idea how to fix this?

Thanks,

Daniel

 

 

0 Kudos
3 Replies
RahulV_intel
Moderator
41 Views

Hi,


Kindly refer to the DPCT system requirements in the following link:

https://software.intel.com/content/www/us/en/develop/articles/intel-dpc-compatibility-tool-system-re...


Supported CUDA versions are: 8.0, 9.x, 10.1, 10.2, 11.0 and 11.1


Could you please specify your oneAPI base toolkit version and CUDA version?


Thanks,

Rahul


RahulV_intel
Moderator
30 Views

Hi,


Just a quick reminder to provide the required details.


Thanks,

Rahul


Daniel_D
Beginner
25 Views

Sorry for my late reply.

 

I use VS2019 as IDE on Windows 10 and CUDA 11.2 which seems not to be supported. I will check if I can use an old CUDA version for testing. I'll let you know.

Thanks,

Daniel

Reply