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
diff --git a/rsContext.cpp b/rsContext.cpp
index ef15568..010a224 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -259,6 +259,8 @@
rsc->props.mLogShadersAttr = getProp("debug.rs.shader.attributes") != 0;
rsc->props.mLogShadersUniforms = getProp("debug.rs.shader.uniforms") != 0;
rsc->props.mLogVisual = getProp("debug.rs.visual") != 0;
+ rsc->props.mLogReduceAccum = getProp("debug.rs.reduce-accum") != 0;
+ rsc->props.mDebugReduceSplitAccum = getProp("debug.rs.reduce-split-accum") != 0;
rsc->props.mDebugMaxThreads = getProp("debug.rs.max-threads");
if (getProp("debug.rs.debug") != 0) {