KhronosGroup / WebCL-conformance

WebCL conformance tests
20 stars 15 forks source link

Kernels using 'double' without enabling cl_khr_fp64 #79

Closed toaarnio closed 9 years ago

toaarnio commented 10 years ago

Several kernels in the conformance tests are using the 'double' datatype without enabling cl_khr_fp64. This causes the build to fail on any conformant WebCL implementation. The extension must be enabled in kernel source as follows:

  #pragma OPENCL EXTENSION cl_khr_fp64 : enable
mikeseven commented 10 years ago

Yeap, corrected in my fork. There are also errors with kernel.GetKernelArgInfo() that requires kernel to be compiled with -cl-kernel-arg-info Also corrected in my fork.

-- Mike

From: Tomi Aarnio notifications@github.com Reply-To: KhronosGroup/WebCL-conformance <reply@reply.gith ub.com> Date: Friday, September 12, 2014 at 7:11 AM To: KhronosGroup/WebCL-conformance WebCL-conformance@noreply.github.com Subject: [WebCL-conformance] Kernels using 'double' without enabling cl_khr_fp64 (#79)

Several kernels in the conformance tests are using the 'double' datatype without enabling cl_khr_fp64. This causes the build to fail on any conformant WebCL implementation. The extension must be enabled in kernel source as follows:

pragma OPENCL EXTENSION cl_khr_fp64 : enable

‹ Reply to this email directly or view it on GitHub https://github.com/KhronosGroup/WebCL-conformance/issues/79 .

toaarnio commented 10 years ago

But wait: -cl-kernel-arg-info is not a valid build option in WebCL. Implementations may of course use it internally, but it's not something that applications or conformance tests can pass to program.build().

mikeseven commented 10 years ago

Yes but this means that we have to compile with this flag all the time.

-- mike On Sep 16, 2014 3:15 AM, "Tomi Aarnio" notifications@github.com wrote:

But wait: -cl-kernel-arg-info is not a valid build option in WebCL. Implementations may of course use it internally, but it's not something that applications or conformance tests can pass to program.build().

— Reply to this email directly or view it on GitHub https://github.com/KhronosGroup/WebCL-conformance/issues/79#issuecomment-55704860 .

toaarnio commented 10 years ago

Yes, unless you have some other means of extracting kernel argument type information. Note that you're going to need that information for setArg, too.

mikeseven commented 10 years ago

Yes, unless you have some other means of extracting kernel argument type information. Note that you're going to need that information for setArg, too.

Yes indeed. So this is one difference we should mention in the spec.

‹ Reply to this email directly or view it on GitHub https://github.com/KhronosGroup/WebCL-conformance/issues/79#issuecomment-5587 8138 .

toaarnio commented 10 years ago

Well, OpenCL 1.1 and WebCL have no differences as far as -cl-kernel-arg-info is considered, because it's not supported by either of them.

However, it's a good idea to make it more explicit that implementations MUST be able to extract kernel argument type information from kernel source, whether by using -cl-kernel-arg-info or some other means. I've added a section on that under Security and Robustness.

toaarnio commented 10 years ago

The original issue still stands: There are several kernels in the conformance tests that are erroneously using the double datatype without first enabling cl_khr_fp64. What's the plan for getting that fixed?