OpenCL run time compiler option

I have add some cl compiler option like "-cl-fast-relaxed-math
" to see the performance change follow online document mention, my did as below

%pgcl --opencl-flags -cl-fast-relaxed-math –

than I has so file output

I comare 2 binary

one is add option "-cl-fast-relaxed-math " andother one is not has this option

but two binary is same

I think maybe I has the wrong way to add compiler option ,so could someone tell me , if I want to add some compiler option , how to do it

Hi Linas,

From our OpenCL compiler team:

Any options passed with --opencl-flags – affect just static compilation. To affect dynamic compilation the user has to make an adjustment within their code to the compilation call, such as the call to clBuildProgram().

As to what is the current effect of the option -cl-fast-relaxed-math; it enables a set of operations that can be performed using various methods, such as Newton’s method, that provide reasonable approximations to the actual results, but with some performance improvement over strict IEEE standards and methods. Just setting this option does not guarantee that opportunities for relaxed math methods will be detected and applied
for a particular piece of code.

  • Mat

Sorry , I have a little be confuse

1.for some compiler-option like "-cl-fast-relaxed-math " for static or dymantic compiler , we could through add this option or not add to disable or enable it right?

2.for below your rely mention ,look like even I add some compiler option ,the code still need to match some patten, than compiler will gen different code and gain perfmorance enhance right ?
if above is true , could you give me some ssample code to verify

3.we has test it at device side ,through command “pgcll_driver” at device side ,I try to add some compiler flag and cl file, than it show unimplement… ,so this mean this option not support right