PDA

View Full Version : -O0 and -O3 speed difference



deNorma
01-15-2010, 01:05 PM
hi, I found there is almost no speed difference for -O3 and -O0 for my openCL code. is this normal? thanks!

jjs
01-15-2010, 02:15 PM
Optimization flags for the CL compiler - the part of the runtime that actually compiles your kernel and could therefore affect kernel performance - are passed during the call to clBuildProgram(). I'm guessing that you're referring to your command line or Makefile optimization flags?

Check our sections 5.4.2 and 5.4.3.3 in the CL spec; they should clarify the situation. Note that there is a standard set of optimization flags a conforming implementation is required to provide, but individual vendors could add all kinds of goodies in there.

deNorma
01-15-2010, 02:43 PM
thanks! yes, I forgot that part...