History log of /frameworks/rs/cpu_ref/rsCpuExecutable.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ae2ec3febedfc29376b9104413fb4042028f1265 01-Jun-2016 David Gross <dgross@google.com> Delete simple reduction implementation.

Bug: 27298560
Change-Id: I8c3d568e98aaf0b7d86881c985d13ed5b8e95338
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
d48481048a68725e79bbe8ba8ea75e710c646fe1 28-Apr-2016 Miao Wang <miaowang@google.com> Fix potential security vulnerability in rsCpuExecutable.cpp

Bug: 28318721
Change-Id: I69a4521bc8fa9c8036f71cac4b846c7118114caa
(cherry picked from commit 523ecf7672c0d7b4c85e9e0674b2d588c42af0dd)
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
633beab5de5ffe4c5068cf1c7a1c0bd09ee9f195 20-Apr-2016 Yang Ni <yangni@google.com> Remove unnecessary logcat message

Bug: 28281435
Change-Id: If0865b20576322845cd23743916c4589ea199287
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
5e48002cc4a11e9ce63852a77488cfb9f6765c2b 06-Apr-2016 Yang Ni <yangni@google.com> Avoid accessing TLS in rsClearObject()

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)
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
10adb0c2029f112b5738228617d5645f6ecea0c5 29-Mar-2016 David Gross <dgross@google.com> Multithreaded execution of certain general reduction kernels; reduction test 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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
6c1876bbef1b2c89975dce91230a168bd2d2ce4c 15-Jan-2016 David Gross <dgross@google.com> Support for general reduction kernels.

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
46c93e405b0ad7e8fca12d0b1f9eac3997798e45 10-Jan-2016 David Gross <dgross@google.com> Expect to see "exportReduceNewCount: 0" in metadata.

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
14ce007a633b10e3b9a3fae29d8f53a7e8c9b59f 31-Jul-2015 Matt Wala <wala@google.com> Add a basic implementation of the reduce kernel API to the CPU
reference implementation.

Bug: 22631253

For now, this just runs a serial reduction on one thread.

Change-Id: I34c96d24bb6f44274de72bb53160abcf79d143b0
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
1efae29f4bbe6c165caf6dfc4b89cf8a5f8c469b 28-Jun-2015 Yang Ni <yangni@google.com> Avoid overwriting shared library file that is open

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)
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
5aa018cc36e589b07674957714d27ae3d1fa1c4e 21-May-2015 Stephen Hines <srhines@google.com> Update RS driver to support extraction of global variable properties.

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
0be70c6dd8897603530dbc7411f27d9dbd4fee9a 11-May-2015 Pirama Arumuga Nainar <pirama@google.com> Merge "Add /system/vendor/{lib|lib64} to linker args"
1de97c307624f57d95281ebaa77c2129e66e21bc 11-May-2015 Jason Sams <jsams@google.com> Merge "Add RSGlobalInfoPass information to RS driver."
682672e36b05349bc4d9dee74e9fab73ce804183 08-May-2015 Pirama Arumuga Nainar <pirama@google.com> Add /system/vendor/{lib|lib64} to linker args

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
4c368af7e705f0bcb77fa99495b2e33ef20d2699 06-May-2015 Stephen Hines <srhines@google.com> Add a way to link against different driver names.

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
8409d6414dd4a42aa59779fcfe9fce18648cb135 29-Apr-2015 Stephen Hines <srhines@google.com> Add RSGlobalInfoPass information to RS driver.

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
38014b1ee631ee61e457b850138d3ea6eb73cb1b 23-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Merge "Tweak arguments to ld.mc"
c2be413317efcc44e3b282fd38fca3334c11777e 22-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Tweak arguments to ld.mc

Change the arguments to match mclinker's revamped option parser.

Change-Id: I71135ebf81e3105192caf5c946b16297b2702d37
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
cb17015fed6b11a5028f31cc804a3847e379945d 16-Apr-2015 Yang Ni <yangni@google.com> Dedup checksum calculation routines

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
2fa8a238dd69afebdeb757adcb1d674043d78e32 26-Mar-2015 Pirama Arumuga Nainar <pirama@google.com> Wrap TEMP_FAILURE_RETRY around system calls

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
d6f44bc5aecd024bf2311b9ae844300fbdc3f584 18-Mar-2015 Pirama Arumuga Nainar <pirama@google.com> Remove unnecessary include of RSInfo.h

RSInfo.h is obsolete and not needed here.

Change-Id: Ifc0e21ac0a393224b1e2dff63946aed16e5aa36d
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
062c287f573ecc06c38ee4295e5627e12c52ac3d 21-Feb-2015 Yang Ni <yangni@google.com> Runtime support for Script Group as single module

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
aa6757ffc1b23d771566439c3179fdbc1e5ba569 14-Feb-2015 Pirama Arumuga Nainar <pirama@google.com> Add build fingerprint and ensure match on .so load

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
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp
2abfcc6d129fe3defddef4540aa95cc445c03a7a 18-Feb-2015 Yang Ni <yangni@google.com> Moved class ScriptExecutable to its own module

b/19283946

This move also included the related class SharedObjectUtils.

Change-Id: Iefd587b659c4ad99340c330955b41cd92df45563
/frameworks/rs/cpu_ref/rsCpuExecutable.cpp