History log of /frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/rsCpuScriptGroup2.cpp
a7481b21c4ad4127f54c02c7402039d068948a34 11-Mar-2016 Yang Ni <yangni@google.com> Fixed intrinsics inside a script group

Bug: 27439842

An RS intrinsic relies on RSExpandKernelDriverInfo.usr for the "this"
pointer to the ScriptIntrinsic object.

Need to to correctly set that field in a script execution for intrinsics.

Also fixed a bcc command-line option.

Added a test of script group with intrinsics to ImageProcessing GroupTest(native).

Change-Id: Ia8b45bca3396ac987ba167fd1709ee89123a2557
(cherry picked from commit 7a106adbb5e370b544f2cbf5b83c063560c81b57)
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
fef0cd45027f235126d4fb62bda5ea9037450d9c 12-Nov-2015 Yang Ni <yangni@google.com> Various fixes in setting globals in a script group

Bug: 25602504

1) Fixed setting 64-bit globals on a 32-bit platform.

The long values were casted to pointer-size integers (uintptr_t) or void*
in the runtime implementation. This caused the upper 32 bits to be lost
on 32-bit platforms. Fixed that by casting to int64_t instead.

2) Fixed setting Allocation values (either as arg or a global) in a script
group.

The size for a value in a script is signed, with -1 indicating that the
value is an Allocation. The sign has to be kept across different layers
of our stack.

3) Added a test for both native and support libraries for passing
floating point values to a script group, and for passing 64-bit values
(long or double) to a script group.

Change-Id: Ifff099a76be7707df7b67c388395f5a00f9cae66
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.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/rsCpuScriptGroup2.cpp
f5029803ae6ce9d92d70b76e7a7cdd8d484f31ca 22-May-2015 verena beckham <verena@codeplay.com> Add a flag to the API to specify -O0 on the bcc command line.

Add a flag RS_CONTEXT_OPT_LEVEL_0 which sets a field mOptLevel in the Context
to 0 when calling bcc.
Using this flag will result in an object file that is easier to debug.

Change-Id: I9673506710cc9f34c415b694fe5d6bc7e967f1db
Signed-off-by: verena beckham <verena@codeplay.com>
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.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/rsCpuScriptGroup2.cpp
1c20667f7a174a7c0a1599d34a40c524fe24c615 19-Jun-2015 Yang Ni <yangni@google.com> Check for kernel chaining in ScriptGroup

b/21958851

bcc expects kernels chained up via input and output.
Check this in the runtime before passing ScriptGroup to bcc for
compiler fusion.

This serves the same purpose as
https://googleplex-android-review.git.corp.google.com/#/c/713267, but
provides additional checks in the runtime before bcc is even called.

Change-Id: I6004d577410ea1684f5043babadc1e1b885c4f6a
(cherry picked from commit 08e7693c13f895677b93537af3b6bc353318a81c)
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
cbff7bcc4aacdc39d56628fa5c7c50518d52748c 27-May-2015 Yang Ni <yangni@google.com> Avoid casting for CpuScript object

b/20894664

Vendor driver may have different layout for the Script object.
Avoid casting mHal.drv but use the vendor provided lookupScript callback
instead.

Change-Id: Ie492dd98a435b35843ca222a8430c51ccfc8aea9
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
8237638f87ca0e265d050fbb13725b41a795fe5f 13-May-2015 Yang Ni <yangni@google.com> Generate global info for fused kernel

b/21114118

Change-Id: I6332572f2f2e6f7857a50bf503e73984371cfe0b
(cherry picked from commit b616bcf3df4ce5d7ccc369acf8e90afe59c359fa)
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.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/rsCpuScriptGroup2.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/rsCpuScriptGroup2.cpp
f02a2b0a2749d4a4f07edbc23eddff2e51d11b72 08-Apr-2015 Yang Ni <yangni@google.com> Compute checksum for script group generated code

Change-Id: I5f469266fd11b5031d1357f356ac40e00f5c0348
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
8b94222cc8ea83c780c98b22dd1921f392a2bcf6 03-Apr-2015 Yang Ni <yangni@google.com> Added a name to ScriptGroup2

Implemented in the runtime and CPU driver the new script group name.
Code caching is not implemented yet, and to be added in another CL.

Change-Id: I46e351c8412740512f56b7915b14f36183c6eeaf
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
bd0af2d161e36e52e6782ccb2d15dd5a36467704 24-Mar-2015 Yang Ni <yangni@google.com> Clean up ScriptGroup2 implementation

b/19944127

- Adjust ref counting
- Fix value size type in closure creation

Change-Id: I1179d34aa67f845578740e71cc2da4f82419f251
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.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/rsCpuScriptGroup2.cpp
b0abb140ac51b93d1a85aadaa63fe057f2d29850 12-Mar-2015 David Gross <dgross@google.com> Pass RsExpandKernelDriverInfo not RsExpandKernelParams.

Which is to say: retire RsExpandKernelParams and pass RsExpandKernelDriverInfo
directly to kernel wrapper functions instead.

Requires related change in frameworks/compile/libbcc.

Change-Id: I453f45ec18f389e88e27fcfa57ddf245d077cb98
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
958d8b23ac969d13ea3da0a2d9a355f5951afa8c 12-Mar-2015 Yang Ni <yangni@google.com> Merge "Handle FP precision in kernel fusion"
dced5c96bc53c45a1aac782ea9bd738b0d50fd09 12-Mar-2015 David Gross <dgross@google.com> Add new APIs rsGetDim[XYZ]() and add RSTest test cases to exercise them.

Test UT_kernel3d does not pass reliably, so it is disabled for now.

Tests will not compile without related
platform/frameworks/compile/libbcc and
platform/frameworks/compile/slang changes.

Bug: 18964628

Change-Id: I39660400953306ceb47c8b5e9665e8f0084775dd
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
edf4ea312cc3f7dd4373f8db5aaf9325ff054c8e 11-Mar-2015 Yang Ni <yangni@google.com> Handle FP precision in kernel fusion

b/19098612

Find the proper core lib for full-precision and relaxed-precions
FP. Path both to bcc while compiling a script group, and let bcc
pick the right one based on the precision of the merged module.

Change-Id: I2a641387f0990463887594729a935a5c3f0f856f
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.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/rsCpuScriptGroup2.cpp
3e5318a36be470ba7a8c5cf82bbe069178733b11 24-Feb-2015 Yabin Cui <yabinc@google.com> Merge "Move use of tempnam to mkstemp."
433558f0f9abbf07770db288183a15fd261cace2 24-Feb-2015 Yabin Cui <yabinc@google.com> Move use of tempnam to mkstemp.

Bug: 19340053
Change-Id: I1734e085beef395ebcc6453af1efaa19f7409e22
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.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/rsCpuScriptGroup2.cpp
ff2bb54ebf593b1d19d3a2e4cfa70a8ea4432c0d 02-Feb-2015 Yang Ni <yangni@google.com> Reformat and remove STL reference from header

b/19148482

Reformmated according to Android C++ style guidelines.
Removed STL references in headers.

Change-Id: I6d82b8fe5ac868067b6d9ebe797125feb97e5641
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
eb9aa675754c49f613c6ad71d41472b30f38b007 27-Jan-2015 Yang Ni <yangni@google.com> Runtime support for invocables in ScriptGroups

This also includes support for InvokeID

Change-Id: I5b59df166ea30b309b8dd9623825ac0e72d03856
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
da0f069871343119251d6b0586be356dc2146a62 12-Jan-2015 Yang Ni <yangni@google.com> Runtime support for compiler kernel fusion.

The runtime will start a seperate process to call the new bcc to fuse kernels.

Change-Id: Ia73ea917a126a5055ec97f13d90a5feaafd6a2f5
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
bf2111d3b3de310932099514f06924e48fa1d7b2 27-Jan-2015 Jason Sams <jsams@google.com> add array launch support.

Change-Id: I66cd89b5b44eafa92f391708a06464cd7cdde3ed
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp
1ffd86b448d78366190c540f98f8b6d641cdb6cf 07-Jan-2015 Yang Ni <yangni@google.com> New Script Group API: runtime and cpu driver support.

Change-Id: I9c612cf8874aabaf0ca7d1640567464c71ed3070
/frameworks/rs/cpu_ref/rsCpuScriptGroup2.cpp