OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

msbuild with visual studio and kernels

SDyul
Beginner
358 Views

Hi i have a kernel that have several includes in it.

Is there automatic way for intel open cl sdk to build them automatically. I have not discovered any. I must add them manually in msbuild. Here is an example.

Nvidia cuda for example has inside GenDepTask that outputs dependencies from the compiler.

ioc.exe does not have anything similar, like cl /showIncludes or gcc -E options.

  <ItemGroup>

    <None Include="..\src\opencl\opencl_stdint.h" />
    <Intel_OpenCL_Build_Rules Include="..\src\opencl\opencl_grayscale.cl">
      <FileType>Document</FileType>
      <AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='release|Win32'">$(ProjectDir)..\src\opencl\opencl_stdint.h;$(ProjectDir)..\src\opencl\opencl_imaging.h;$(ProjectDir)..\src\opencl\opencl_image_kernel_info.h</AdditionalDependencies>
      <AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">$(ProjectDir)..\src\opencl\opencl_stdint.h;$(ProjectDir)..\src\opencl\opencl_imaging.h;$(ProjectDir)..\src\opencl\opencl_image_kernel_info.h</AdditionalDependencies>
      <Include Condition="'$(Configuration)|$(Platform)'=='release|Win32'">$(ProjectDir)..\src\opencl</Include>
      <Include Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">$(ProjectDir)..\src\opencl</Include>
      <Device Condition="'$(Configuration)|$(Platform)'=='release|Win32'">1</Device>
      <Device Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">1</Device>
      <SPIR32 Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">1</SPIR32>
      <SPIR32 Condition="'$(Configuration)|$(Platform)'=='release|Win32'">1</SPIR32>
    </Intel_OpenCL_Build_Rules>
  </ItemGroup>

 

0 Kudos
1 Reply
Robert_I_Intel
Employee
358 Views

Stefan,

This is a good point. I believe we don't have this capability right now, but it would be great to add it. I will send a request to our compiler team.

Thanks!

0 Kudos
Reply