Home
last modified time | relevance | path

Searched refs:DeviceManager (Results 1 – 25 of 27) sorted by relevance

12

/packages/modules/NeuralNetworks/runtime/test/
DTestFailingDriver.cpp74 DeviceManager* deviceManager = DeviceManager::get(); in SetUp()
76 !DeviceManager::partitioningAllowsFallback(deviceManager->getPartitioning())) { in SetUp()
79 mTestDevice = DeviceManager::forTest_makeDriverDevice( in SetUp()
83 DeviceManager::getCpuDevice(), in SetUp()
87 virtual void TearDown() { DeviceManager::get()->forTest_reInitializeDeviceList(); } in TearDown()
154 ASSERT_EQ(steps[1]->executionStep()->getDevice(), DeviceManager::getCpuDevice()); in TEST_F()
157 ASSERT_EQ(steps[3]->executionStep()->getDevice(), DeviceManager::getCpuDevice()); in TEST_F()
DTestIntrospectionControl.cpp52 using DeviceManager = nn::DeviceManager; typedef
121 DeviceManager::get()->forTest_reInitializeDeviceList(); in TearDown()
144 DeviceManager::get()->forTest_registerDevice(nn::makeSharedDevice( in registerDevices()
229 if (DeviceManager::get()->getUseCpuOnly()) { in TEST_F()
841 if (DeviceManager::get()->getUseCpuOnly() != (kDriverKind == DriverKind::CPU)) { in TEST_P()
853 const std::string& name = DeviceManager::get()->getDrivers()[0]->getName(); in TEST_P()
859 DeviceManager::get()->forTest_registerDevice( in TEST_P()
866 DeviceManager::get()->forTest_registerDevice( in TEST_P()
1171 if (DeviceManager::get()->getUseCpuOnly()) { in TEST_F()
1178 DeviceManager::get()->forTest_registerDevice( in TEST_F()
[all …]
DTestExtensions.cpp33 using DeviceManager = ::android::nn::DeviceManager; typedef
76 if (DeviceManager::get()->getUseCpuOnly()) { in SetUp()
80 DeviceManager::get()->forTest_registerDevice( in SetUp()
89 DeviceManager::get()->forTest_reInitializeDeviceList(); in TearDown()
DTestCompilationCaching.cpp334 if (DeviceManager::get()->getUseCpuOnly()) { in TEST_P()
338 DeviceManager::get()->forTest_registerDevice(makeSharedDevice(kDeviceName.data(), kDriver)); in TEST_P()
340 [] { DeviceManager::get()->forTest_reInitializeDeviceList(); }); in TEST_P()
377 DeviceManager::get()->forTest_registerDevice(makeSharedDevice(kDeviceName.data(), driver)); in compileModel()
379 [] { DeviceManager::get()->forTest_reInitializeDeviceList(); }); in compileModel()
420 if (DeviceManager::get()->getUseCpuOnly()) { in TEST_P()
438 if (DeviceManager::get()->getUseCpuOnly()) { in TEST_P()
470 if (DeviceManager::get()->getUseCpuOnly()) { in TEST_P()
DTestMemoryDomain.cpp177 if (DeviceManager::get()->getUseCpuOnly()) { in SetUp()
182 DeviceManager::get()->forTest_setDevices({}); in SetUp()
186 DeviceManager::get()->forTest_reInitializeDeviceList(); in TearDown()
262 DeviceManager::get()->forTest_registerDevice( in createAndRegisterDriver()
265 DeviceManager::get()->forTest_registerDevice(makeSharedDevice( in createAndRegisterDriver()
453 DeviceManager::get()->forTest_registerDevice(makeSharedDevice( in TEST_F()
DTestPartitioningRandom.cpp106 using DeviceManager = nn::DeviceManager; typedef
1065 ASSERT_EQ(c.setPartitioning(DeviceManager::kPartitioningNo), Result::NO_ERROR); in TEST_P()
1107 auto device = DeviceManager::forTest_makeDriverDevice( in TEST_P()
1112 devices.push_back(DeviceManager::getCpuDevice()); in TEST_P()
1135 ASSERT_EQ(cNoFallback.setPartitioning(DeviceManager::kPartitioningWithoutFallback), in TEST_P()
1151 ASSERT_EQ(cWithFallback.setPartitioning(DeviceManager::kPartitioningWithFallback), in TEST_P()
1157 DeviceManager::getCpuDevice()); in TEST_P()
1164 ASSERT_TRUE(plan.forTest_simpleGetDevice() != DeviceManager::getCpuDevice()); in TEST_P()
DTestExecution.cpp50 using DeviceManager = nn::DeviceManager; typedef
602 auto device = DeviceManager::forTest_makeDriverDevice( in TestCompilation()
614 c->forTest_setPartitioning(DeviceManager::kPartitioningWithoutFallback); in TestCompilation()
641 if (!DeviceManager::get()->getUseCpuOnly()) { in TestIntrospectionCompilation()
662 DeviceManager::get()->forTest_registerDevice( in ExecutionTestTemplate()
678 DeviceManager::get()->forTest_reInitializeDeviceList(); in TearDown()
754 if (kUseIntrospectionAPI && DeviceManager::get()->getUseCpuOnly()) { in TestWait()
DTestMemoryInternal.cpp67 mIsCpuOnly = android::nn::DeviceManager::get()->getUseCpuOnly(); in SetUp()
72 android::nn::DeviceManager::get()->setUseCpuOnly(mIsCpuOnly); in TearDown()
183 android::nn::DeviceManager::get()->setUseCpuOnly(true); in TEST_F()
DTestRemoveDefaultArguments.cpp141 if (DeviceManager::get()->getUseCpuOnly()) { in SetUp()
145 DeviceManager::get()->forTest_registerDevice( in SetUp()
151 virtual void TearDown() { DeviceManager::get()->forTest_reInitializeDeviceList(); } in TearDown()
DTestPartitioning.cpp158 using DeviceManager = ::android::nn::DeviceManager; typedef
1171 auto driverDevice = DeviceManager::forTest_makeDriverDevice(device); in makeDevices()
1174 devices.push_back(DeviceManager::getCpuDevice()); in makeDevices()
1621 ASSERT_EQ(planC.forTest_simpleGetDevice(), DeviceManager::getCpuDevice()); in TEST_F()
1916 step1, &model1, DeviceManager::getCpuDevice(), in TEST_F()
1967 ASSERT_EQ(cPNo.setPartitioning(DeviceManager::kPartitioningNo), Result::NO_ERROR); in TEST_F()
1971 ASSERT_EQ(cPNo.getExecutionPlan().forTest_simpleGetDevice(), DeviceManager::getCpuDevice()); in TEST_F()
1978 ASSERT_EQ(cPWithFallback.setPartitioning(DeviceManager::kPartitioningWithFallback), in TEST_F()
1984 DeviceManager::getCpuDevice()); in TEST_F()
1989 ASSERT_EQ(cPWithoutFallback.setPartitioning(DeviceManager::kPartitioningWithoutFallback), in TEST_F()
[all …]
DTestMain.cpp67 android::nn::DeviceManager::get()->setUseCpuOnly(useCpuOnly); in test()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/name/
DDeviceNameSetFragment.java82 String currentDeviceName = DeviceManager.getDeviceName(getActivity()); in onCreateActions()
116 int currentNamePosition = mDeviceNames.indexOf(DeviceManager.getDeviceName(getActivity())); in onResume()
128 DeviceManager.setDeviceName(getActivity(), mDeviceNames.get((int) id)); in onGuidedActionClicked()
DDeviceManager.java27 public class DeviceManager { class
DSuggestionContentProvider.java71 || !Build.MODEL.equals(DeviceManager.getDeviceName(getContext()))); in call()
DDeviceNameSummaryFragment.java69 DeviceManager.getDeviceName(getActivity())), in onCreateGuidance()
DDeviceNameSetCustomFragment.java109 DeviceManager.setDeviceName(getActivity(), name.toString());
/packages/modules/NeuralNetworks/runtime/
DCompilationBuilder.cpp46 mPartitioning(explicitDeviceList ? DeviceManager::kPartitioningWithoutFallback in CompilationBuilder()
47 : DeviceManager::get()->getPartitioning()), in CompilationBuilder()
82 if (!DeviceManager::partitioningAllowsFallback(mPartitioning)) { in finish()
100 mPlan.becomeSingleStep(DeviceManager::getCpuDevice(), mModel); in finish()
DManager.h163 class DeviceManager {
193 static DeviceManager* get();
227 DeviceManager();
DManager.cpp1139 if (!DeviceManager::get()->syncExecCpu()) { in execute()
1174 if (!DeviceManager::get()->syncExecCpu()) { in compute()
1219 DeviceManager* DeviceManager::get() { in get()
1220 static DeviceManager manager; in get()
1224 std::shared_ptr<Device> DeviceManager::getCpuDevice() { in getCpuDevice()
1228 std::shared_ptr<Device> DeviceManager::forTest_makeDriverDevice(const SharedDevice& device) { in forTest_makeDriverDevice()
1264 void DeviceManager::findAvailableDevices() { in findAvailableDevices()
1281 void DeviceManager::registerDevice(const SharedDevice& device) { in registerDevice()
1287 DeviceManager::DeviceManager() { in DeviceManager() function in android::nn::DeviceManager
DTypeManager.h135 const DeviceManager* mDeviceManager = DeviceManager::get();
DExecutionBuilder.cpp156 mAllowCpuFallback(DeviceManager::partitioningAllowsFallback(compilation->mPartitioning)), in ExecutionBuilder()
611 DeviceManager::getCpuDevice(), /*preparedModel=*/nullptr, in cpuFallbackFull()
1077 if (DeviceManager::get()->syncExecRuntime()) { in compute()
1440 return mDevice == DeviceManager::getCpuDevice(); in isCpu()
1539 auto [n, preparedModel] = DeviceManager::getCpuDevice()->prepareModel(makeModel, preference, in computeOnCpuFallback()
DNeuralNetworks.cpp650 *numDevices = DeviceManager::get()->getDrivers().size(); in ANeuralNetworks_getDeviceCount()
659 const std::vector<std::shared_ptr<Device>>& devices = DeviceManager::get()->getDrivers(); in ANeuralNetworks_getDevice()
765 const MetaModel metaModel(canonicalModel, DeviceManager::get()->strictSlicing()); in ANeuralNetworksModel_getSupportedOperationsForDevices()
804 for (auto& device : DeviceManager::get()->getDrivers()) { in ANeuralNetworksCompilation_createForDevices()
1195 const auto& drivers = DeviceManager::get()->getDrivers(); in ANeuralNetworksCompilation_create()
/packages/modules/NeuralNetworks/runtime/test/fibonacci_extension/
DFibonacciExtensionTest.cpp45 if (DeviceManager::get()->getUseCpuOnly()) { in SetUp()
53 DeviceManager::get()->forTest_registerDevice(makeSharedDevice( in SetUp()
72 } else if (DeviceManager::get()->forTest_isCpuDevice(device)) { in SetUp()
89 DeviceManager::get()->forTest_reInitializeDeviceList(); in TearDown()
/packages/modules/NeuralNetworks/runtime/test/fuzzing/
DTestRandomGraph.cpp145 mStandardDevices = DeviceManager::get()->forTest_getDevices(); in SetUpTestCase()
146 mSyntheticDevices.push_back(DeviceManager::forTest_makeDriverDevice( in SetUpTestCase()
148 mSyntheticDevices.push_back(DeviceManager::forTest_makeDriverDevice( in SetUpTestCase()
150 mSyntheticDevices.push_back(DeviceManager::forTest_makeDriverDevice( in SetUpTestCase()
405 DeviceManager::get()->forTest_setDevices(mSyntheticDevices); in testRandomGraph()
407 DeviceManager::get()->forTest_setDevices(mStandardDevices); in testRandomGraph()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/about/
DAboutFragment.java61 import com.android.tv.settings.name.DeviceManager;
269 new IntentFilter(DeviceManager.ACTION_DEVICE_NAME_UPDATE)); in onStart()
290 deviceNamePref.setSummary(DeviceManager.getDeviceName(getActivity())); in refreshDeviceName()

12