summaryrefslogtreecommitdiff
path: root/nn
diff options
context:
space:
mode:
authorSlava Shklyaev <slavash@google.com>2020-05-07 14:13:13 +0100
committerSlava Shklyaev <slavash@google.com>2020-05-07 15:29:14 +0100
commit1702271f14eaf3da48cf1f56f64c4b923ff00d61 (patch)
treea0a3083f67e1ee6093ec42fb1d510143cf19e02b /nn
parentbeee52d97d2318d46b2b673a90c88e3d9ba8cf9e (diff)
downloadml-1702271f14eaf3da48cf1f56f64c4b923ff00d61.tar.gz
Skip FailingDriverTest when fallback is disabled
The test does not make sense when partitioning or CPU fallback is disabled. Bug: 155849908 Test: adb shell setprop debug.nn.partition 0 && \ NNT_static --gtest_filter=FailingDriverTest.FailAfterInterpretedWhile Test: adb shell setprop debug.nn.partition 2 && \ NNT_static --gtest_filter=FailingDriverTest.FailAfterInterpretedWhile Change-Id: Ie81eef414de3f767f4dfcf282d39ba63e366057f Merged-In: Ie81eef414de3f767f4dfcf282d39ba63e366057f (cherry picked from commit 19e59551e5aeee51d390108b7b9058a39bfe171f)
Diffstat (limited to 'nn')
-rw-r--r--nn/runtime/test/TestControlFlowExecution.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/nn/runtime/test/TestControlFlowExecution.cpp b/nn/runtime/test/TestControlFlowExecution.cpp
index 34e4b2923..d345c6f13 100644
--- a/nn/runtime/test/TestControlFlowExecution.cpp
+++ b/nn/runtime/test/TestControlFlowExecution.cpp
@@ -72,12 +72,14 @@ class FailingTestDriver : public SampleDriverPartial {
class FailingDriverTest : public ::testing::Test {
virtual void SetUp() {
- if (DeviceManager::get()->getUseCpuOnly()) {
+ DeviceManager* deviceManager = DeviceManager::get();
+ if (deviceManager->getUseCpuOnly() ||
+ !DeviceManager::partitioningAllowsFallback(deviceManager->getPartitioning())) {
GTEST_SKIP();
}
mTestDevice =
DeviceManager::forTest_makeDriverDevice(kTestDriverName, new FailingTestDriver());
- DeviceManager::get()->forTest_setDevices({
+ deviceManager->forTest_setDevices({
mTestDevice,
DeviceManager::getCpuDevice(),
});