Migrating to SYCL
One-stop forum for getting assistance migrating your existing code to SYCL
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
48 Discussions

issues to compile cpp code that uses cuda header

Daniel_D
Novice
2,205 Views

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
4 Replies
RahulV_intel
Moderator
2,168 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-requirements.html


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


0 Kudos
RahulV_intel
Moderator
2,157 Views

Hi,


Just a quick reminder to provide the required details.


Thanks,

Rahul


0 Kudos
Daniel_D
Novice
2,152 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

0 Kudos
RahulV_intel
Moderator
2,104 Views

Hi,


Have you tried using the supported CUDA versions? Let us know if you face any issues.


Thanks,

Rahul


0 Kudos
Reply