diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-11 15:04:44 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-11 15:36:33 +0800 |
commit | 290b3b76e76c5b6b577372dd716d7f7d05d95e1e (patch) | |
tree | c6a6184d8ef55ead5f93d11d266cb35c1dd4e819 | |
parent | a57428db848f84a20c83fa4d9b58b5d9f9d767ea (diff) |
GBE: don't enable double by default.
Actually, we don't support double completely currently.
Let's disable it now. This bring a little incompatible point with the 1.2 spec
which doesn't require the kernel to use the following pragma to enable fp64.
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
If the application wants to try the partially supported double with beignet
under opencl 1.2, the application will still need to add the above pragma.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
-rw-r--r-- | backend/src/backend/program.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index b83e9ebd..d60835e2 100644 --- a/backend/src/backend/program.cpp +++ b/backend/src/backend/program.cpp @@ -807,10 +807,14 @@ namespace gbe { p = strstr(const_cast<char *>(options), "-cl-opt-disable"); if (p) optLevel = 0; - + // XXX enable cl_khr_fp64 may cause some potential bugs. + // we may need to revisit here latter when we want to support fp64 completely. + // For now, as we don't support fp64 actually, just disable it by default. +#if 0 #define ENABLE_CL_KHR_FP64_STR "#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n" if (!strstr(const_cast<char *>(options), "-cl-std=CL1.1")) fwrite(ENABLE_CL_KHR_FP64_STR, strlen(ENABLE_CL_KHR_FP64_STR), 1, clFile); +#endif clOpt += options; } |