diff options
author | David Gross <dgross@google.com> | 2020-04-22 19:01:56 -0700 |
---|---|---|
committer | David Gross <dgross@google.com> | 2020-04-24 15:30:13 -0700 |
commit | 81508c095820c07f28938987a800cc5e398a8f0b (patch) | |
tree | a58d56e53d050710fbce89a773957d287deb023f /nn | |
parent | af55ce116ec438bf73c250ba8b9f64631f209608 (diff) | |
download | ml-81508c095820c07f28938987a800cc5e398a8f0b.tar.gz |
Fix "#define VERBOSE" bit-rot (build failure)
Test: Build NeuralNetworksTest_static both normally and with
#define VERBOSE uncommented in TestPartitioningRandom.cpp
Bug: 136735929
Change-Id: I79e33239b63885b050d77b5a819b7be82a80528e
Diffstat (limited to 'nn')
-rw-r--r-- | nn/runtime/test/TestPartitioningRandom.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nn/runtime/test/TestPartitioningRandom.cpp b/nn/runtime/test/TestPartitioningRandom.cpp index 892cfd405..ad9007199 100644 --- a/nn/runtime/test/TestPartitioningRandom.cpp +++ b/nn/runtime/test/TestPartitioningRandom.cpp @@ -1186,6 +1186,7 @@ TEST_P(RandomPartitioningTest, Test) { { std::cout << "signatures = " << signatures.size() << ", devices = " << devices.size() << std::endl; + // TODO: When dumping steps, include non-ExecutionSteps. const ExecutionPlan& plan = c2->getExecutionPlan(); switch (plan.forTest_getKind()) { case ExecutionPlan::Kind::SIMPLE: @@ -1195,13 +1196,19 @@ TEST_P(RandomPartitioningTest, Test) { const auto& steps = plan.forTest_compoundGetSteps(); std::set<const Device*> devicesInPlan; for (const auto& step : steps) { - devicesInPlan.insert(step->getDevice().get()); + if (const auto* executionStep = step->tryExecutionStep()) { + devicesInPlan.insert(executionStep->getDevice().get()); + } } std::cout << "plan: compound, " << steps.size() << " steps over " << devicesInPlan.size() << " devices" << std::endl; for (unsigned i = 0; i < steps.size(); i++) { - std::cout << "Step " << i << ": " << ModelStats(steps[i]->getStepModel()) - << ", device = " << steps[i]->getDevice()->getName() << std::endl; + if (const auto executionStep = steps[i]->tryExecutionStep()) { + std::cout << "Step " << i << ": " + << ModelStats(executionStep->getStepModel()) + << ", device = " << executionStep->getDevice()->getName() + << std::endl; + } } break; } |