summaryrefslogtreecommitdiff
path: root/cpu_ref/rsCpuExecutable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix error handling problemsTing-Yuan Huang2017-02-071-3/+12
| | | | | | | | | There are 1) a potential memory leak by reduceDescriptions. 2) potential null-pointer-accesses by pragmaKeys and pragmaValues. Test: make WITH_TIDY=1 Change-Id: I46db7c371e87474dd4d8c256fe1be252fdc944f1
* Delete simple reduction implementation.David Gross2016-06-101-59/+18
| | | | | Bug: 27298560 Change-Id: I8c3d568e98aaf0b7d86881c985d13ed5b8e95338
* Fix potential security vulnerability in rsCpuExecutable.cppMiao Wang2016-04-291-8/+12
| | | | | | Bug: 28318721 Change-Id: I69a4521bc8fa9c8036f71cac4b846c7118114caa (cherry picked from commit 523ecf7672c0d7b4c85e9e0674b2d588c42af0dd)
* Remove unnecessary logcat messageYang Ni2016-04-211-2/+0
| | | | | Bug: 28281435 Change-Id: If0865b20576322845cd23743916c4589ea199287
* Avoid accessing TLS in rsClearObject()Yang Ni2016-04-061-2/+2
| | | | | | | | | | | | | | | | | | | Bug: 27874893 Bug: 27925095 rsClearObject() may be called on rsContextDestroy() in the JNI thread, where TLS is not initialized. This also reverted Icca50fade1199b6f530f963e9e694366b7d8cf67 that made rsContextDestroy() go through the FIFO. rsContextDestroy() must happen off the FIFO, since it joins the FIFO consuming thread. Both the rsClearObject() change and the rsContextDestroy() revert need to go together to make RenderScript and Camera CTS tests pass. Hence this single CL for both changes. Change-Id: I5f1d91a4cc1ce9bf2b3386fbef6f1171638b5266 (cherry picked from commit ade3137c22dd91694742145c2d5fe9d6bae17516)
* Multithreaded execution of certain general reduction kernels; reduction test ↵David Gross2016-03-291-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | overhaul. A reduction kernel is eligible for multithreaded execution if it has a combiner function and it is launched over a 1D iteration space. Note: Properties debug.rs.reduce-accum and debug.rs.reduce-split-accum are added for debugging multithreaded reduction. The following changes are made to reduction tests in RsTest: - Overhaul the test framework -- now data-driven, and can execute the same test multiple times with different seeds and input sizes, features separate sets of quick correctness tests, full correctness tests, and performance tests. (Performance tests are not run by default.) - Report timing information for test execution. - Report more information for fz* kernel testing. - Remove dp kernel testing -- this involved floating-point arithmetic which is not guaranteed to produce identical results between java and rs or for different rs multithreaded executions. - Add sumgcd kernel testing. This is intended to be representative of a compute-heavy kernel. - findMinAndMax kernel testing must compare cell value not cell index -- two or more cells might have the same min or max value, and java and various rs multithreaded executions are not guaranteed to find the same cell. - Fix bug in findMinAndMax kernel's combiner function. (It behaved incorrectly when operating on an accumulator datum that has been initialized but never passed to the accumulator function.) - RsTest now requests largeHeap. Bug: 27299475 Change-Id: I58f99c21389dbae5c8e3ad85d98700dc165664bb
* Support for general reduction kernels.David Gross2016-01-191-3/+85
| | | | | | | | | | | | | | Requires coordinated change in frameworks/base. Requires coordinated change in frameworks/compile/libbcc in order for RsTest to run. At present, general reduction kernels are run single-threaded. Also: Remove dead struct field MTLaunchStructForEach::sig. Bug: 23535724 Change-Id: Ice17ccf20a902f8a106eaa62ec071d46e3c0ad8c
* Expect to see "exportReduceNewCount: 0" in metadata.David Gross2016-01-151-1/+16
| | | | | | | | | | Needs corresponding change in frameworks/compile/libbcc: The driver and bcinfo need to remain precisely in sync with regard to metadata format in order for RenderScript to work at all. Bug: 23535724 Change-Id: Iad82e495d03215e970d2e99ff45ccfa629688f03
* Add a basic implementation of the reduce kernel API to the CPUMatt Wala2015-08-141-1/+42
| | | | | | | | | | reference implementation. Bug: 22631253 For now, this just runs a serial reduction on one thread. Change-Id: I34c96d24bb6f44274de72bb53160abcf79d143b0
* Avoid overwriting shared library file that is openYang Ni2015-06-291-25/+32
| | | | | | | | | | | b/21949580 Writing different contents to an existing .so file, which is currently open, may corrupt its globals and code. Choose a different file name instead. Change-Id: I3e649b09a55b43339283aa1c46f2844c66434c17 (cherry picked from commit 9844cffc8af28c4829012bc0c48f85d04b671f88)
* Update RS driver to support extraction of global variable properties.Stephen Hines2015-05-221-7/+18
| | | | | | | | | | | Bug: 20306487 This patch adds some new enums to classify properties (such as "static", "constant", and "pointer") for global variables. The reference driver is also extended to provide methods to examine these properties (when the bitcode is compiled with bcc). Change-Id: I331756f8a8990caf5ebdf85599060434a7cfdcb7
* Merge "Add /system/vendor/{lib|lib64} to linker args"Pirama Arumuga Nainar2015-05-111-1/+2
|\
| * Add /system/vendor/{lib|lib64} to linker argsPirama Arumuga Nainar2015-05-071-1/+2
| | | | | | | | | | | | | | | | | | | | Add vendor-specific lib directory to ld.mc's library search path. Since ld.mc takes multiple search directories, there is no need to derive a single path at runtime. bug 20894664 Change-Id: Id62d2acbd94914c70bf4668f553a94a33e2a0587
* | Merge "Add RSGlobalInfoPass information to RS driver."Jason Sams2015-05-111-0/+28
|\ \ | |/ |/|
| * Add RSGlobalInfoPass information to RS driver.Stephen Hines2015-05-051-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 20306487 This change enables vendor drivers to configure support for including additional information about global variables in the emitted CPU code. This information includes the number of total global variables, the names of these variables, the addresses of these variables and the sizes of these variables. The driver can also select whether the information includes constant (immutable) globals or not. The reference driver defaults to embedding information about each of the existing, non-constant global variables. Change-Id: I1e55fc3f08e518f04eeee3e4f9dc7b6ea3b80d7c
* | Add a way to link against different driver names.Stephen Hines2015-05-061-2/+10
|/ | | | | | | | | | The existing linker path hard-coded "-lRSDriver" into the command line, but this won't work for partner drivers that have a different implementation loaded. In order to still properly handle use of the CPU driver, this needs to change depending on whether we actually loaded an OVERRIDE_RS_DRIVER or not. Change-Id: I0c4a4f12f5db819b234952bc8f364ac6300f147b
* Merge "Tweak arguments to ld.mc"Pirama Arumuga Nainar2015-04-221-3/+4
|\
| * Tweak arguments to ld.mcPirama Arumuga Nainar2015-04-211-3/+4
| | | | | | | | | | | | Change the arguments to match mclinker's revamped option parser. Change-Id: I71135ebf81e3105192caf5c946b16297b2702d37
* | Dedup checksum calculation routinesYang Ni2015-04-161-14/+9
|/ | | | | | | | | | | | I introduced a separate routine to cacluate checksum for ScriptGroup in my previous CL, in addition to the one we use for regular scripts. This CL removes the new one and uses the old one. While I am on it, I made some other minor changes, e.g., changing mBuildChecksum in RsdCpuScriptIml from char* to uint32_t, and a few other minor cleanups in ScriptGroup2 implementation. Change-Id: I168fdbb4e7bd14f1549a687e7b0d0ca6dd4da866
* Wrap TEMP_FAILURE_RETRY around system callsPirama Arumuga Nainar2015-03-251-36/+1
| | | | | | | | | | | | | | BUG 19934827 Wrap TEMP_FAILURE_RETRY around system calls that can return EINTR (waitpid, close). Refactor fork/exec flows in various places into a utility function and log errors so we can better understand failures in the test server. Fix a small use-after-free issue in ScriptGroups. Change-Id: I60b192f83c395a13c27cd6bd2289c44132b84791
* Remove unnecessary include of RSInfo.hPirama Arumuga Nainar2015-03-231-1/+0
| | | | | | RSInfo.h is obsolete and not needed here. Change-Id: Ifc0e21ac0a393224b1e2dff63946aed16e5aa36d
* Runtime support for Script Group as single moduleYang Ni2015-03-101-5/+29
| | | | | | | | | | | Also made two other cleanups: - Changed KernelID/InvokeID into IDBase in class Closure Rather than having two fields in class Closure, one of type ScriptKernelID and the other InovkeID, use a single field of the common base class IDBase. Added a boolean field to indicate whether it is kernel or invoke, since -fno-rtti is on. - Removed user pointer from CPU closure Change-Id: I5553f86b2e58325f85649078d48685a38f12d62f
* Add build fingerprint and ensure match on .so loadPirama Arumuga Nainar2015-03-031-1/+25
| | | | | | | | | | | | | | | | | bug 19216507 If ro.debuggable system property is set, - Compute the Adler32 checksum of bitcode, compiler arguments, bcc, libclcore files. - On shared object load, check that there is an embedded checksum value in .rs.info and it matches the value computed in the previous step. The .so is not loaded if the checksums don't match. - If invoking bcc, pass the checksum as an argument. If ro.debuggable is not set, a constant checksum is added to .rs.info. But it is never checked. Change-Id: I0a9d16b34148b748daf744007a8515511714a5a5
* Moved class ScriptExecutable to its own moduleYang Ni2015-02-201-0/+578
b/19283946 This move also included the related class SharedObjectUtils. Change-Id: Iefd587b659c4ad99340c330955b41cd92df45563