I read in the spec that the macro EMBEDDED_PROFILE must be added to the language to do embedded profile
where exactly in the .cl file does it need to be added?
and what is the syntax?


If you wish to have your .cl files take into account the restrictions of the embedded profile, I think just test for the existence of the macro.




As embedded seems to be a subset of “regular”, defining EMBEDDED_PROFILE in the options arg of clBuildProgram() should allow for testing.

I tried what you said but I got:

clang: unknown command line argument 'EMBEDDED_PROFILE

may be we have to do something like : #pragma EMBEDDED_PROFILE