<#part sign=pgpmime> On Tue, 3 Apr 2012 10:14:09 +0300, Alex Toldayev <[email protected]> wrote: > Hi everyone! > > I'd like to ask if there is any chance to build an opencl program from > several .cl files? > > I've found this useful thread > > http://stackoverflow.com/questions/7622293/how-to-structure-large-opencl-kernels > > They say there is the feature in OpenCL 1.2 and with Nvidia compiler you > can #include "anotherpart.cl" file. But including doesn't work for me (i > have an ATI card): > > /tmp/OCLG3u4M4.cl(8): catastrophic error: cannot open source file "add.cl" > #include "add.cl" > ^ > > 1 catastrophic error detected in the compilation of "/tmp/OCLG3u4M4.cl". > Compilation terminated. > > Internal error: clc compiler invocation failed.
Add options=["-I", "."] to build(). > And I'd like to ask whether anybody uses linking object files in openCL 1.2 > (I can't find useful reference on the web)? Or, maybe, there is a simpler > way to split a file of kernels? (It seems the issue isn't very hard. So if > the problem remains I could write a little parsing-utility for making a one > cl-string from multiple files. Maybe someone already has done it?) > Any advise or reference would be helpful. Include files are the way to go for now, I think. CL 1.2 isn't widely implemented yet, and I haven't exactly figured out how the object-level linking is going to work with PyOpenCL's compiler caching. Andreas _______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
