Age | Commit message (Collapse) | Author |
|
To be used also by Skia code to detect problems with Vulkan drivers.
The watchdog does not handle OpenCL because neither did the original
code, but also because OpenCLZone::hardDisable() called from it
would deadlock on SolarMutex for some reason.
Change-Id: I483d8cb0b11a4e1e65c564f4e4c29ab68843ff71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88008
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
improve the script, but it still generates some false positives
Change-Id: If8ee1cba8c04ac0be11f73220149e6de15f24f44
Reviewed-on: https://gerrit.libreoffice.org/81929
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The side effect is intentional here.
Change-Id: I05d166bb312ea3a97905607c5effccf1e8d8eef7
Reviewed-on: https://gerrit.libreoffice.org/79668
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Recent GCC 10 trunk in C++20 mode reports issues like
> include/opencl/OpenCLZone.hxx:27:9: error: ‘++’ expression of ‘volatile’-qualified type is deprecated [-Werror=volatile]
> 27 | gnEnterCount++;
> | ^~~~~~~~~~~~
But unlike in the case of ec17c8ec5256386b0197a8ffe5d7cad3e7d70f8f
"-Werror=volatile in OpenGLZone",
* it looks like there are no multi-threading issues here, and the counters are
just accessed (via OpenCLZone::isInZone) from the VCLExceptionSignal_impl
signal handler in addition to being modified (via OpenCLZone RAII objects)
from mainline code; and
* from the usage pattern of gnEnterCount and gnLeaveCount it appears that they
can be combined into a single counter.
(f41eb66302208f384a475fb20c98b6d1b0676cb6 "opencl: OpenCLZone, detect CL
device change and disable CL on crash" presumably modelled OpenCLZone naively
after OpenGLZone, without simplifying it where possible.) One minor advantage
of having two monotonically increasing counters is that when they overflow,
the implementation of isInZone (comparing them for equality) still gives
~useful results (assuming that a false "match" of non-overflown gnEnterCount
against overflown gnLeaveCount is highly unlikely). But instances of
OpenCLZone RAII objects are presumably never nested very deeply (if at all),
so that the newly added "TODO: overflow" comment (which would even cause UB if
std::sig_atomic_t is signed) is probably of no practical concern.
Change-Id: I92e1f2c46ca996a0a86bacabcda2accba5eb6298
Reviewed-on: https://gerrit.libreoffice.org/79106
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Some OpenCL implementations may be broken, e.g. pocl simply
asserts and aborts if it can't find Clang. In order to protect
against crashes caused by faulty OpenCL drivers, when testing OpenCL
functionality on OpenCL setup change, first do a simple test
in a separate helper.
Change-Id: I1cf328e731c48f47745b27c7130e7521254209f5
Reviewed-on: https://gerrit.libreoffice.org/71080
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I76f15a8e7724384e8ba773621bdcac1351b32a0a
Reviewed-on: https://gerrit.libreoffice.org/62086
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Rename the global opencl namespace to openclwrapper. Its public API is
after all declared in a file called openclwrapper.hxx. The confusion
started when part of the OpenCL code was moved out from sc some years
ago.
Change-Id: I98ebd8498b2244804411e5de9169eb619f86070b
|
|
If SAL_DISABLE_OPENCL is set we don't want to do any kind of
OpenCL initialization. Put an extra guard in fillOpenCLInfo
(and similar methods in opencl package) to prevent that.
Put the check if OpenCL can be used into one place which checks
SAL_DISABLE_OPENCL and UseOpenCL in configuration.
Change-Id: Icc216d4299d3a7942843117ab9b9411de8075b11
Reviewed-on: https://gerrit.libreoffice.org/30025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Ie3da1d6ec91e951b1ffc15abf376c7af57789e47
Reviewed-on: https://gerrit.libreoffice.org/29802
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Add a flag to the OpenCLZone indicating whether we are performing the
first-start OpenCL functionality verification, so that if we run into
a crash that is caught by the VCL VCLExceptionSignal_impl() handler,
we terminate the process with the EXITHELPER_NORMAL_RESTART
status after first having disabled OpenCL use. The wrapper process will
then restart soffice.bin. This is for Windows only so far.
This matches what we do if OpenGL fails early during start of
LibreOffice.
Change-Id: Ibb9bf3a86b7521bf16728de2a118ad4323be674b
Reviewed-on: https://gerrit.libreoffice.org/28086
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I42d2d6a12d49fc60c625dc2d230f70d05cf67673
|
|
(TDR is Timeout detection and recovery, was introduced in Vista.)
Change-Id: Ic49629adf7630e61cebcdfcc431ca96ba3fbaf7e
Reviewed-on: https://gerrit.libreoffice.org/27518
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Amazingly we fell-back to the old calculation path for
crashes in older LibreOffices, might as well have this on master.
Change-Id: Ifc1de41c93329207d7a1917c736e361d840c2821
Reviewed-on: https://gerrit.libreoffice.org/27166
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
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>
|
|
Still problematic; since we only show OpenCL as being available
if it has already been initialized and used.
Change-Id: I5e82a3f778f4f2025408330b6d9da51402d01e79
Reviewed-on: https://gerrit.libreoffice.org/26866
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.
Add a few missing includes provided by them.
Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: Ieccd31d3cefd2fc397a296827de29d834ce093f0
|
|
Change-Id: Ie7a53f3ecc05d1d4f6f71aa8165315f9155c60dc
|
|
We use only one OpenCL device per context or program, so get rid of
half-implemented (or half-reverted?) "support" for multiple devices per
context.
Change-Id: I951f29e867e5b3f96f6e051567ee38d607bd7ecf
|
|
Will make it less demanding on low-end hardware, where the device
driver is unresponsive for too long when an OpenCL kernel handling lots
of data is executing. This makes Windows restart the driver which is
problematic.
I tried several approaches of splitting, both at higher levels in sc
and at the lowest level just before creating and executing the OpenCL
kernel(s). This seems to be the most minimal and local approach. Doing
it at the lower level would have required too much poking into our
obscure OpenCL code, like passing an offset parameter to every kernel.
Use a simple heuristic to find out whether to split. On the
problematic low-end devices, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT is
4, while for more performant devices it is 1 or 8.
|
|
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c
Reviewed-on: https://gerrit.libreoffice.org/18564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
There is nothing Calc-specific in this function, and surely it will be good to
output OpenCL errors symbolically also in the opencl module.
Change-Id: Ibe7d0d036f24dd87e06b8290224e1033dda0f3d1
|
|
So move it there. While at it, make it use SAL_WARN() instead of
printf.
Also, add a few more SAL_WARN() and SAL_INFO().
Change-Id: Ib058fb20d07757331ca364a8d7649abc59e9494b
|
|
Change-Id: Ia63c8bd6552cdbc2b5eabadaa044b9f1eca5f664
|
|
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>
|
|
Change-Id: Ib72e0df4ac3ca90d440a32359e711d77e758cca0
|
|
Change-Id: I33d51b0e30445c34c792210e7c656c1d48159019
|
|
Change-Id: I95fbee302213e6ced469dd7a2a1c254178159357
|
|
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
|
|
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
|
|
Change-Id: I24c48d2540a8cb7d2a823862d53cddf90d41f94a
|
|
Intermediate commit. More changes will follow: The device selection
logic needs to be moved, too. (And cleaned up.) Instead of the
separate formulacalculationoptions dialog we should simply have a
normal options page for those OpenCL-related settings that will remain
purely Calc-specific, like the formula opcode subsetting.
Change-Id: Id60d95e80d377cbbf5780beb473b221bce06b5e5
|