cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

spectral
Adept II

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 ?

Thanks

Krys

0 Likes
6 Replies
binying
Challenger

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

0 Likes
Rom1
Adept I

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.

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 ?

Thanks

0 Likes

install latest driver. it will install latest runtime. you can keep older SDK. also even if you install latest SDK if you restrain from using OpenCL 1.2 functions (like clEnqueueFillBuffer or enums CL_DEVICE_BUILT_IN_KERNELS) you should be fine. I can run my application compiled with APP SDK 2.7 on nVidia box without problem.

The problem is that when I try to compile with the last SDK I got some errors... it seems it is not compatible. There are new methods, by example to manage the images... old ones have been replaced !!!!

0 Likes

I had a similar problem. I am using the cl.hpp from Khronos, which is also at the moment only a cl 1.1 header. So there is a workaround with the -DCL_USE_DEPRECATED_OPENCL_1_1_APIS compiler option.

http://www.khronos.org/message_boards/viewtopic.php?t=4550

Hope this can help.

0 Likes