6 Replies Latest reply on Oct 20, 2012 7:30 PM by cguenther

    Support of big kernels


      Dear AMD SDK Team,


      I'm currently working on a OpenCL kernel that contains a lot of code, some parts of this kernels are dynamically generated and the minimum size of the kernel is 8000 lines.


      Since a long time, I can't compile and run my kernels with AMD SDK, both CPU and GPU can't be used.


      I have try to divide my kernel in several smaller ones but it is impossible ! Why ? I support a 'shading language' in my application, it mean that a lot of features are natively available in this language (Something like GLSL). So, I provide all theses features for this language. Also I have to include the shaders that the users create and they can be very big in some cases, also I have no limitation on the numbers of available shaders.


      Anyway, even with a small set of shaders it seems I have too much code for the AMD SDK... I would like to have my software compatible with the AMD/ATI hardware but currently I can't. (Notice that with NVidia and Intel SDK I have no problem).


      So, do you have any plan to support big kernels ?





        • Re: Support of big kernels

          Have you tried the latest driver, even the beta version?

          • Re: Support of big kernels

            I have kernels with more than 9000 lines of code and they compile and work nice on AMD. Moreover it needs nearly one hour to compile on Nvidia (!!) and less than 2 minutes on AMD ...

            There is one good tip to help the AMD compiler, if you know the local work size (work_group_size) to be always the same use (eg 32 by 32)  use the reqd_work_group_size attribute.

            __kernel __attribute__((reqd_work_group_size(32, 32,1)))

            It's a very good optimization in compile time and compute time. Some of my kernels do not compile if I don't add this.

              • Re: Support of big kernels

                Thanks for all your answer,


                I still have the OpenCL 1.1 driver. Why ? Because NVidia and Intel SDK does not support OpenCL 1.2 I think.

                And so, I still have to remain compatible with their SDK ! I don't think that I can use the last AMD SDK (with all the API changes) and still continue to run my application with 1.1 version of the runtime on other devices.


                I'm right ?


                But, previously I have try and Yang Zang from MultiCoreWareInc has try to run my application on SDK 2.7 but still crash on the CPU (not the GPU it seems). So, I'm not sure I can use the last SDK.


                Maybe someone from AMD can advice ?