Khronos Public Bugzilla
Bug 822 - WebCL must be implementable on both OpenCL 1.1 and 1.2
WebCL must be implementable on both OpenCL 1.1 and 1.2
Status: RESOLVED FIXED
Product: WebCL
Classification: Unclassified
Component: Specification
1.0
All All
: P5 normal
: ---
Assigned To: WebCL Mailing List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-11 10:48 PDT by Tomi Aarnio
Modified: 2013-04-25 08:16 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomi Aarnio 2013-03-11 10:48:15 PDT
The WebCL spec is currently written with reference to OpenCL 1.1. 

Given that OpenCL 1.2 drivers are becoming more and more common, while many platforms will remain at 1.1 for the foreseeable future, we need to make sure that WebCL can be implemented on both OpenCL 1.1 and 1.2.
Comment 1 Tomi Aarnio 2013-03-12 08:58:27 PDT
Our intention that WebCL should also work on top of OpenCL 1.2 is now written down in the spec, Chapter 6 (Implementation notes).

However, let's leave this ticket open until we've combed through the spec, written the conformance tests, and have at least one implementation to prove that we've discovered and successfully papered over all differences between CL 1.1 and 1.2.
Comment 2 Antonio Gomes 2013-03-12 10:03:02 PDT
Latest Mac hardwares ship support to OpenCL 1.2 (e.g. Macbook pro mid/2012 or later).

From the implementation point of view, WebCL/WebKit runs fine on top of both OpenCL 1.1 and 1.2 in host system.
Comment 3 Tomi Aarnio 2013-03-13 06:06:35 PDT
(In reply to comment #2)

> From the implementation point of view, WebCL/WebKit runs fine on top of both
> OpenCL 1.1 and 1.2 in host system.

Thanks, that's a good data point. The same holds true for our WebCL prototype on Intel OpenCL 1.2 on x86.

That said, there's a difference between "running fine" and being 100% compatible, both forward and backward. For example, the "-cl-strict-aliasing" compiler option is valid in OpenCL 1.1 but not 1.2.

We must also make sure (in the validator and conformance tests) that people won't be able to use 1.2 features that are not available in 1.1. The compiler option "-cl-std=CL1.1" should take care of it, but we need to verify that.
Comment 4 Antonio Gomes 2013-03-15 13:06:52 PDT
Below declaration needs update, then:

  /* OpenCL Version */
  CLenum VERSION_1_0                               = 1;
  CLenum VERSION_1_1                               = 1;
Comment 5 Antonio Gomes 2013-03-15 22:15:42 PDT
(In reply to comment #4)
> Below declaration needs update, then:
> 
>   /* OpenCL Version */
>   CLenum VERSION_1_0                               = 1;
>   CLenum VERSION_1_1                               = 1;

Igor, actually, got a pertinent reply: this exposes info about the host that should not be exposed, does not it?
Comment 6 Tomi Aarnio 2013-03-18 07:18:00 PDT
(In reply to comment #4)

>   CLenum VERSION_1_0                               = 1;
>   CLenum VERSION_1_1                               = 1;

These don't seem to carry any information whatsoever, given that WebCL requires OpenCL 1.1. I'll remove them if there are no objections.
Comment 7 Mikael Bourges-Sevenier 2013-04-25 08:16:31 PDT
WebCL 1.0 requires:
- OpenCL 1.1 with security and robustness extensions (OpenCL 1.2 context termination and memory initialization).
- or, OpenCL 1.2 with security and robustness extensions (OpenCL 1.2 context termination and memory initialization).