Memory access flags not enforced

Discussion created by _Big_Mac_ on Feb 1, 2010
Latest reply on Feb 2, 2010 by _Big_Mac_
Can write to read_only

Page 8 of the slides from http://gpgpu.org/wp/wp-content/uploads/2009/09/C1-OpenCL-API.pdf says


Not really, it seems. You can set WRITE_ONLY to an input buffer and READ_ONLY to an output buffer and the app will work flawlessly.

This is not inconsistent with the specs, which say such operations are "undefined", so they might as well work without signaling any warnings or errors. Actually, the runtime is free to ignore access flags completely and it does so. But why stress the importance of those flags then? Is it something left for future implementation?

By the way, NVIDIA's implementation does the same thing.