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.

Relative include paths don't work in clBuildProgram

ABoxe
Beginner
365 Views

I am using the 2014 beta SDK.  

I would like to pass "-I  RELATIVE\\PATH\\TO\\FILES" in as a build parameters, but this doesn't work.

I have to pass the absolute path instead. So, this forces me to hard code the build path, which is annoying

when I try building from a different location.

Thanks,

Aaron

0 Kudos
4 Replies
Yuri_K_Intel
Employee
365 Views
Hi, I can't reproduce this issue (I'm using 2013 version of the SDK though, but I don't think this is important here). I have created a kernel file with single line: #include "kernel.cl" And I'm passing relative path in build options to clBuildProgram like this for example: "-I..\\..\\FolderWithKernels" And it works fine. So please double check that you're passing correct path. Thanks, Yuri
0 Kudos
ABoxe
Beginner
365 Views

Thanks, Yuri.  I should clarify: this is only a problem when targetting my AMD GPU using the Intel SDK. 

When I target the Intel CPU, I don't even need to enter an include path. 

Cheers,

Aaron

 

 

0 Kudos
Yuri_K_Intel
Employee
365 Views
In this case you should ask this question on AMD forum. Since when you run the application and, as you say - target AMD GPU, you're selecting AMD platform (and the device, of course), so it's AMD runtime which builds the cl program. Thanks, Yuri
0 Kudos
ABoxe
Beginner
365 Views

OK, thanks Yuri.

0 Kudos
Reply