summaryrefslogtreecommitdiff
path: root/opencl/inc
AgeCommit message (Collapse)AuthorFilesLines
2016-07-12desktop: validate OpenCL drivers before use.Michael Meeks1-0/+3
OpenCL validation needs to happen before drivers are used in anger. This should isolate any crashes, and/or mis-behavior to We use app version, CL driver version and file time-stamp to trigger re-testing the device. If anything fails: hard disable OpenCL. We use an opencl validation sheet (cl-test.ods) and install it. It is a minimal CL set - it requires a very short formula group length, and combines several CL functions into few formulae to test more. The sheet structure, in particular the manual squaring / SQRT is necessary to stick within the default CL subset, and ensure that formulae are CL enabled from the root of the dependency tree up. Reviewed-on: https://gerrit.libreoffice.org/27131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit c44726c48228d9c6a5960e302b1c0bd16b0099c4) + opencl: bail out early in missing OpenCL case. (cherry picked from commit 605a5dc088385ad21c33028d8107125c0316ddb1) + Remove bogus dependency from opencl to configmgr Since f41eb66302208f384a475fb20c98b6d1b0676cb6 "opencl: OpenCLZone, detect CL device change and disable CL on crash" vcl links against opencl (so indirectly linked against configmgr), which caused CppunitTest_configmgr_unit to include the configmgr object files both statically (through gb_CppunitTest_use_library_objects) and through the linked-in configmgr dynamic library, which in turn caused ASan builds to report an ODR violation for a doubly defined 'typeinfo name for configmgr::Access'. (cherry picked from commit 9c711f05fa10dc70e4257a1f48d43f539353541a) Change-Id: I18682dbdf9a8ba9c16d52bad4447e9acce97f0a3 Reviewed-on: https://gerrit.libreoffice.org/27141 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-07-12opencl: OpenCLZone, detect CL device change and disable CL on crashTomaž Vajngerl1-0/+4
Guard OpenCL calls with OpenCLZone, so if a OpenCL call crashes we detect this and disable OpenCL so next time the user doesn't encounter the crash at the same calculation because he has a broken OpenCL drivers. Similar has been implemented for OpenGL with good results. Additionaly we persistently remember a known good OpenCL device ID and driver version so we can match this and perform calculation tests when they change. This is to ensure that the selected OpenCL device performs as we expect. In this commit the calculation tests aren't included yet. Remove complex static initializer in opencl wrapper library. Change-Id: I1a8b81ee31298731efcf63dc6a476955afc035e9 Reviewed-on: https://gerrit.libreoffice.org/27064 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit f41eb66302208f384a475fb20c98b6d1b0676cb6) Reviewed-on: https://gerrit.libreoffice.org/27099 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-05-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I1c1894fcf533291b34a662b6efb96dcfa75b92b3 Reviewed-on: https://gerrit.libreoffice.org/24760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-29coverity#1358844 Uninitialized pointer fieldCaolán McNamara1-0/+3
Change-Id: I66f34570c49f647cb1fd7775ef263e5e720d8064
2016-04-22Various loplugin warnings in opencl/Stephan Bergmann2-3/+3
Change-Id: Ia6254777bc7972e2272dba542e315a8d3bd0fdf0
2016-04-22opencl: better logging of devices and device selectionTomaž Vajngerl2-451/+368
changes: - Clew misses a lot of things, added defines needed for gathering platform and device info. - Refactored profile saving and loading to use libxml2 instead the weird type of saving the profile data. - Added an additional "log" file which is similar to the OpenGL but it writes the OpenCL relevant information like which devices and platforms are available (+ all the extra useful version information) and which device was selected (if any at all). Change-Id: I0fe793c756f8f4f1761fe120fc361df36e581903 Reviewed-on: https://gerrit.libreoffice.org/24270 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2015-10-01loplugin:unusedmethodsNoel Grandin1-15/+0
- improvements to the plugin to find more method calls - improvements to python script to remove more false+ - fix the FORCE_COMPILE_ALL build flag to include code in the $WORKDIR Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836 Reviewed-on: https://gerrit.libreoffice.org/19064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-29loplugin:removeunusedmethods, remove unused stuffNoel Grandin1-2/+0
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann1-7/+7
Change-Id: I7e6315bf2a2e3d6e089ef8f5eacc69d2b413374a
2015-03-02OpenCL: correctly handle platforms without devicesGiuseppe Bilotta1-4/+22
When an OpenCL platform has no devices (of the requested type), calls to clGetDeviceIDs() are required to return with the error value CL_DEVICE_NOT_FOUND. Some platforms (e.g. Clover as of Mesa 10.4.2) do not touch their output parameters in such cases, which means that in some conditions the `num` variable where the number of devices of the platform should be stored may be used uninitialized. This can lead to segmentations faults in the subsequent calls to clGetDeviceInfo(). Simply reinitializing num to 0 is sufficient to prevent the segfault in the case of Mesa, but proper error handling is included for completeness. Change-Id: Ia25192f6aa953838a545a9e7c9fca050d2703b60 Reviewed-on: https://gerrit.libreoffice.org/14700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2015-01-20Some more loplugin:cstylecast: openclStephan Bergmann1-2/+2
Change-Id: I93c590a71ea768511a89d6fe17dc7aa01fe73b02
2014-12-08Don't treat clew as part of an "external" clcc moduleTor Lillqvist1-1/+2
There is no obvious authoritative upstream for clew anyway, so it causes philosophical problems for distros. For a while, we used to use a zip archive from the "clcc" project on SourceForge that included clew.c and clew.h. (Before that we also just had clew.c and clew.h in our source repo.) So, drop the external/clcc module and have clew.c and clew.h in the source repo again. But this time clew is in a module of its own, not in sc. This re-introduces "No need to have OpenCL optional at configure-time" This reverts commit 764836cb00e8e6dfd2ab48e080a166ec90359e01. Change-Id: I413142f4f9f8399489f9c3e5327132822f07a454 Reviewed-on: https://gerrit.libreoffice.org/13368 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-11-27Clean up confusing OpenCL code a bitTor Lillqvist1-1/+1
Get rid of the silly OpenCLDevice class that had only static members. We can as well just use namespacing. Remove functions only used internally in openclwrapper.cxx from the now public openclwrapper.hxx header. Change-Id: If7336edd262c772564dc13e64113d72d0b52428c
2014-11-27Move more Calc-independent OpenCL stuff from the sc to the opencl moduleTor Lillqvist2-0/+666
No cleanups yet. Just removed the "sc" namespace parts now when this stuff is no longer Calc-specific. There is still horribly confusing use of the same OpenCLDevice name for both a class and as a namespace, for instance. And the OpenCLDevice class has only public static members even, so effectively it acts as just a namespace anyway... Etc. Change-Id: Idc5f30a721df0101426c676f04a85e02c5dc8443