cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

jch
Journeyman III

Controlling calclCompile() behavior

Did you have compiled with SCOption_BIAS_SCHEDULE_TO_MINIMIZE_INSTS or SCOption_BIAS_SCHEDULE_TO_MINIMIZE_REGS?

Today, I'll test speeds.

 

0 Likes
Reply
empty_knapsack
Adept II

Controlling calclCompile() behavior

I've tried these options but didn't notice any visible difference in code size or speed.

0 Likes
Reply
hazeman
Adept II

Controlling calclCompile() behavior

Originally posted by: MicahVillmow empty_knapsack, there is currently no interface to provide options to the shader compiler. It is something that we are working on and I am hoping to add it to an upcoming release.


Any news on this subject ?

0 Likes
Reply
MicahVillmow
Staff
Staff

Controlling calclCompile() behavior

Other items are higher priority at this time, so it is not likely to happen.
0 Likes
Reply
hazeman
Adept II

Controlling calclCompile() behavior

Originally posted by: MicahVillmow Other items are higher priority at this time, so it is not likely to happen.


So any bigger/more advanced OpenCL/IL kernel is supposed to be much slower or at least there are plans to improve IL compiler so it doesn't remove function calls ?

 

0 Likes
Reply
MicahVillmow
Staff
Staff

Controlling calclCompile() behavior

hazeman,
We are working on that, but the design of IL makes allowing function calls extremely difficult to get correct.
For example the following kernel:
float4 image_read_and_compute(image2d_t type) {
read image, do something and return result
}

kernel void image_compute(image2d_t type1, image2d type2, global float4 *val) {
val[get_global_id(0)] = image_read_and_compute(type1) * image_read_and_compute(type2);
}


Since the resource ID/sampler ID of the image is in the instruction, generating code correctly for image_read_and_compute is difficult.

We are moving closer to a solution, but it isn't easy to get correct.
0 Likes
Reply