diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-07-11 15:12:38 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-07-12 08:39:01 +0000 |
commit | c44726c48228d9c6a5960e302b1c0bd16b0099c4 (patch) | |
tree | 26c3fbd11a29af5de6d555dcec3076dde9701378 /sc | |
parent | 9c711f05fa10dc70e4257a1f48d43f539353541a (diff) |
desktop: validate OpenCL drivers before use.
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.
Change-Id: I18682dbdf9a8ba9c16d52bad4447e9acce97f0a3
Reviewed-on: https://gerrit.libreoffice.org/27131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/Module_sc.mk | 1 | ||||
-rw-r--r-- | sc/Package_opencl.mk | 16 | ||||
-rw-r--r-- | sc/source/core/opencl/cl-test.ods | bin | 0 -> 18186 bytes | |||
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 10 |
4 files changed, 17 insertions, 10 deletions
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 9c331bbd85ee..392fbe096844 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Module_add_targets,sc,\ Library_scd \ Library_scfilt \ $(call gb_Helper_optional,DESKTOP,Library_scui) \ + $(call gb_Helper_optional,OPENCL,Package_opencl) \ )) $(eval $(call gb_Module_add_l10n_targets,sc,\ diff --git a/sc/Package_opencl.mk b/sc/Package_opencl.mk new file mode 100644 index 000000000000..ef1579f52eb5 --- /dev/null +++ b/sc/Package_opencl.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Package_Package,sc_opencl_runtimetest,$(SRCDIR)/sc/source/core/opencl)) + +$(eval $(call gb_Package_add_files,sc_opencl_runtimetest,$(LIBO_ETC_FOLDER)/opencl,\ + cl-test.ods \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/source/core/opencl/cl-test.ods b/sc/source/core/opencl/cl-test.ods Binary files differnew file mode 100644 index 000000000000..8380e0b93a83 --- /dev/null +++ b/sc/source/core/opencl/cl-test.ods diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 49415042dd9c..15ce590bfc6c 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -336,16 +336,6 @@ bool FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool delete msInstance; msInstance = new sc::opencl::FormulaGroupInterpreterOpenCL(); - if (aSelectedCLDeviceVersionID != officecfg::Office::Common::Misc::SelectedOpenCLDeviceIdentifier::get()) - { - // perform OpenCL calculation tests - - // save the device - std::shared_ptr<comphelper::ConfigurationChanges> xBatch(comphelper::ConfigurationChanges::create()); - officecfg::Office::Common::Misc::SelectedOpenCLDeviceIdentifier::set(aSelectedCLDeviceVersionID, xBatch); - xBatch->commit(); - } - return true; } |