More testing for partitions with boundary temporaries of unknown size.
PartitioningTest:
- Add verification that no existing tests have boundary temporaries of
unknown size.
- Add new tests:
- Model output with unspecified shape and sufficient size.
Disabled because of b/168657259.
- Boundary temporary of unknown size, model outputs of unspecified
shape and sufficient size. Disabled because of b/168657259.
- Boundary temporary of unknown size, model outputs of specified
shape.
- Boundary temporary of unknown size, model output with insufficient size.
- Model output with insufficient size.
- Verify that all tests have expected
modelOutputsThatAreDownstreamInputs set: Most tests have empty set,
two old tests have a one-member set, the four new tests each have a
one-member set (sometimes a model output of unknown size).
- "#ifdef VERBOSE" now produces more information when a comparison fails.
RandomPartitioningTest:
- Some ASYNC testing now becomes FENCED testing,
to ensure that boundary temporaries of unknown size are handled
properly (we expect, but do not confirm, that this will happen via
fallback to ASYNC). This potentially changes all test cases (because
of its effect on pseudorandom number sequences). Note that all
attempts in these tests to test handling of boundary temporaries of
unknown size is vulnerable to compile-time shape propagation (an
optimization that does not occur today): If such propagation happens,
then we may not actually have boundary temporaries of unknown size,
and so we will not be testing what we want to test.
- Under "#ifdef TRACE_DYNTEMP", generate some debugging output that
may be useful to determine test coverage for support of boundary
temporaries of unknown size.
Also:
- Improvements to Execution wrapper: New methods getComputeMode() and
compute(ComputeMode). Change TestExecution.cpp and
TestGenerated.cpp to use the new methods.
- Improve logging to better distinguish burst execution from ordinary
synchronous execution.
- Make some validation failure messages more verbose.
Test: NeuralNetworksTest_static (PartitioningTest, DynamicTemporariesTest, RandomPartitioningTest)
Test: Confirm that Execution wrapper changes work as expected by
eyeballing VLOG(EXECUTION) output for NeuralNetworksTest_static
Flavor/ExecutionTest13.Wait/0 256 and for *Generated*add 256
Bug: 132458982
Merged-In: I11e0e5bba9a8c6762881127a8aaf10b8cef9db3d
Change-Id: I11e0e5bba9a8c6762881127a8aaf10b8cef9db3d
(cherry picked from commit c7766b0113918f4bac0c53ad74264df3d1723f7d)
diff --git a/common/ValidateHal.cpp b/common/ValidateHal.cpp
index 6470fbc..46f9b2f 100644
--- a/common/ValidateHal.cpp
+++ b/common/ValidateHal.cpp
@@ -782,8 +782,9 @@
// extension operand type.
if (!isExtensionOperandType(operand.type) &&
!nonExtensionOperandTypeIsScalar(static_cast<int>(operand.type))) {
- NN_RET_CHECK_GT(modelRank, 0) << "Model has unknown rank but the request "
- "does not specify the rank.";
+ NN_RET_CHECK_GT(modelRank, 0)
+ << "Model " << type << " " << requestArgumentIndex
+ << " has unknown rank but the request does not specify the rank.";
}
// Validate that all the dimensions are specified in the model.
for (size_t i = 0; i < modelRank; i++) {