Home
last modified time | relevance | path

Searched refs:TypeManager (Results 1 – 12 of 12) sorted by relevance

/packages/modules/NeuralNetworks/runtime/test/
DTestExtensions.cpp35 using TypeManager = ::android::nn::TypeManager; typedef
83 TypeManager::get()->forTest_reset(); in SetUp()
90 TypeManager::get()->forTest_reset(); in TearDown()
143 EXPECT_FALSE(TypeManager::isExtensionsUseAllowed(native_info(""), in TEST_F()
147 EXPECT_FALSE(TypeManager::isExtensionsUseAllowed(native_info("/foobar/foo"), in TEST_F()
151 EXPECT_TRUE(TypeManager::isExtensionsUseAllowed(native_info("/data/foo"), in TEST_F()
155 EXPECT_TRUE(TypeManager::isExtensionsUseAllowed(native_info("/vendor/foo"), in TEST_F()
159 EXPECT_TRUE(TypeManager::isExtensionsUseAllowed(native_info("/odm/foo"), in TEST_F()
163 EXPECT_FALSE(TypeManager::isExtensionsUseAllowed(native_info("/system/foo"), in TEST_F()
167 EXPECT_FALSE(TypeManager::isExtensionsUseAllowed(native_info("/system/allowlisted"), in TEST_F()
[all …]
DTestValidation.cpp142 EXPECT_TRUE(::android::nn::TypeManager::get()->forTest_registerExtension({ in SetUp()
156 ::android::nn::TypeManager::get()->forTest_reset(); in TearDown()
/packages/modules/NeuralNetworks/runtime/
DTypeManager.cpp121 TypeManager::TypeManager() { in TypeManager() function in android::nn::TypeManager
124 mExtensionsAllowed = TypeManager::isExtensionsUseAllowed( in TypeManager()
135 bool TypeManager::isExtensionsUseAllowed(const AppInfoFetcher::AppInfo& appPackageInfo, in isExtensionsUseAllowed()
177 void TypeManager::findAvailableExtensions() { in findAvailableExtensions()
185 bool TypeManager::registerExtension(Extension extension, const std::string& deviceName) { in registerExtension()
214 bool TypeManager::getExtensionPrefix(const std::string& extensionName, uint16_t* prefix) { in getExtensionPrefix()
227 bool TypeManager::getExtensionType(const char* extensionName, uint16_t typeWithinExtension, in getExtensionType()
235 bool TypeManager::getExtensionInfo(uint16_t prefix, const Extension** extension) const { in getExtensionInfo()
242 bool TypeManager::getExtensionOperandTypeInfo( in getExtensionOperandTypeInfo()
263 bool TypeManager::isTensorType(OperandType type) const { in isTensorType()
[all …]
DTypeManager.h38 class TypeManager {
40 static TypeManager* get() { in get()
41 static TypeManager manager; in get()
111 void forTest_reset() { *this = TypeManager(); } in forTest_reset()
126 TypeManager();
DMemory.cpp109 const bool isTensor = TypeManager::get()->isTensorType(kOperand.type); in validate()
134 return {.logicalSize = TypeManager::get()->getSizeOfData(kOperand.type, mUpdatedDimensions), in getMetadata()
147 TypeManager::get()->isTensorType(kOperand.type)); in updateMetadata()
152 TypeManager::get()->getSizeOfData(kOperand.type, combined.value())); in updateMetadata()
158 return TypeManager::get()->getSizeOfData(kOperand.type, kInitialDimensions) == 0; in createdWithUnknownShape()
360 if (!TypeManager::get()->isTensorType(operand.type) && !mDesc.dimensions.empty()) { in addRole()
392 if (mOperand.has_value() && !TypeManager::get()->isTensorType(mOperand->type) && in setDimensions()
466 const uint32_t size = TypeManager::get()->getSizeOfData(mOperand->type, mDesc.dimensions); in finish()
489 const uint32_t size = TypeManager::get()->getSizeOfData(mOperand->type, mDesc.dimensions); in allocate()
DModelBuilder.cpp69 return TypeManager::get()->getExtensionType(extensionName, typeWithinExtension, type) in getExtensionType()
80 if (isExtension(operandType) && !TypeManager::get()->areExtensionsAllowed()) { in addOperand()
92 !TypeManager::get()->getExtensionOperandTypeInfo(operandType, &info)) { in addOperand()
141 if (TypeManager::get()->isTensorType(operand.type) && in setOperandValue()
154 uint32_t neededLength = TypeManager::get()->getSizeOfData(operand); in setOperandValue()
332 if (TypeManager::get()->isTensorType(operand.type) && tensorHasUnspecifiedDimensions(operand)) { in setOperandValueFromMemory()
337 uint32_t neededLength = TypeManager::get()->getSizeOfData(operand); in setOperandValueFromMemory()
364 if (isExtension(operationType) && !TypeManager::get()->areExtensionsAllowed()) { in addOperation()
380 if (!TypeManager::get()->getExtensionInfo(extensionPrefix, &extension)) { in addOperation()
973 CHECK(TypeManager::get()->getExtensionInfo(prefix, &extension)); in addExtensionWithPrefix()
DModelArgumentInfo.cpp55 neededLength = TypeManager::get()->getSizeOfData(operand.type, ret.mDimensions); in createFromPointer()
89 neededLength = TypeManager::get()->getSizeOfData(operand.type, ret.mDimensions); in createFromMemory()
DExecutionBuilder.cpp74 const TypeManager* tm = TypeManager::get(); in validateOutputShapesFromDriver()
121 NN_RET_CHECK(TypeManager::get()->getExtensionOperandTypeInfo(operand.type, &info)); in checkDimensionInfo()
143 if (!allowUnspecified && TypeManager::get()->isTensorType(operand.type) && in checkDimensionInfo()
577 TypeManager::get()->isTensorType(mModel->getOutputOperand(i).type) && in areOutputsFullySpecified()
1133 NN_RET_CHECK(!TypeManager::get()->sizeOfDataOverflowsUInt32(operandType, in updateOutputShapes()
1251 const uint32_t actualSize = TypeManager::get()->getSizeOfData( in updateOutputShapes()
DAndroid.bp96 "TypeManager.cpp",
217 "TypeManager.cpp",
DExecutionPlan.cpp734 return TypeManager::get()->isTensorType(operand.type); in hasUnknownSize()
1258 const uint32_t size = TypeManager::get()->getSizeOfData(sourceOperand); in makeController()
1366 const TypeManager* typeManager = TypeManager::get(); in makeController()
1806 const uint32_t size = TypeManager::get()->getSizeOfData(sourceOperand); in nextCompound()
DManager.cpp1008 uint32_t size = TypeManager::get()->getSizeOfData(type, desc.dimensions); in allocate()
/packages/modules/NeuralNetworks/runtime/test/fibonacci_extension/
DFibonacciExtensionTest.cpp56 TypeManager::get()->forTest_reset(); in SetUp()
90 TypeManager::get()->forTest_reset(); in TearDown()