Home
last modified time | relevance | path

Searched refs:IOType (Results 1 – 16 of 16) sorted by relevance

/packages/modules/NeuralNetworks/runtime/
DMemory.cpp55 bool validate(const CompilationBuilder*, IOType, uint32_t, const ANeuralNetworksOperandType*, in validate() argument
78 bool validate(const CompilationBuilder* compilation, IOType, uint32_t, in validate() argument
105 bool validate(const CompilationBuilder* compilation, IOType ioType, uint32_t index, in validate()
317 int MemoryBuilder::addRole(const CompilationBuilder& compilation, IOType ioType, uint32_t index, in addRole()
319 const char* tag = ioType == IOType::INPUT ? "addInputRole" : "addOutputRole"; in addRole()
329 std::vector<std::tuple<const RuntimePreparedModel*, IOType, uint32_t>> roles; in addRole()
330 auto callback = [&roles](const auto* preparedModel, IOType type, uint32_t index) { in addRole()
333 if (ioType == IOType::INPUT) { in addRole()
346 if (ioType == IOType::INPUT) { in addRole()
387 if (type == IOType::INPUT) { in addRole()
DCompilationBuilder.cpp297 *alignment = mPlan.getMemoryPreference(IOType::INPUT, index).alignment; in getPreferredMemoryAlignmentForInput()
319 *padding = mPlan.getMemoryPreference(IOType::INPUT, index).padding; in getPreferredMemoryPaddingForInput()
342 *alignment = mPlan.getMemoryPreference(IOType::OUTPUT, index).alignment; in getPreferredMemoryAlignmentForOutput()
365 *padding = mPlan.getMemoryPreference(IOType::OUTPUT, index).padding; in getPreferredMemoryPaddingForOutput()
DMemory.h97 using CompilationRole = std::tuple<const CompilationBuilder*, IOType, uint32_t>;
129 virtual bool validate(const CompilationBuilder* compilation, IOType ioType, uint32_t index,
226 int addRole(const CompilationBuilder& compilation, IOType ioType, uint32_t index, float freq);
DExecutionPlan.h563 using StepRole = std::tuple<uint32_t, IOType, uint32_t>;
566 using StepRoleCallback = std::function<void(const RuntimePreparedModel*, IOType, uint32_t)>;
749 MemoryPreference getMemoryPreference(IOType type, uint32_t index) const;
DExecutionPlan.cpp260 void addRole(const ExecutionStep& step, uint32_t operandIndex, IOType type, in addRole()
1057 analyzer.addRole(*step, sourceIndex, IOType::INPUT, i); in findMemoryStepRoles()
1062 analyzer.addRole(*step, sourceIndex, IOType::OUTPUT, i); in findMemoryStepRoles()
2057 callback(mPreparedModel.get(), IOType::INPUT, index); in forEachStepRoleOfInput()
2062 callback(mPreparedModel.get(), IOType::OUTPUT, index); in forEachStepRoleOfOutput()
2090 MemoryPreference ExecutionPlan::getMemoryPreference(IOType type, uint32_t index) const { in getMemoryPreference()
2095 const auto sourceOperandIndex = type == IOType::INPUT ? getInputSourceOperand(index) in getMemoryPreference()
2105 index, [&alignment, &padding](const auto* preparedModel, IOType, uint32_t) { in getMemoryPreferenceOfSourceOperand() argument
DNeuralNetworksV2.cpp948 return mb->addRole(*c, IOType::INPUT, index, frequency); in ANeuralNetworksMemoryDesc_addInputRole()
961 return mb->addRole(*c, IOType::OUTPUT, index, frequency); in ANeuralNetworksMemoryDesc_addOutputRole()
DExecutionBuilder.cpp232 if (!memory->getValidator().validate(mCompilation, IOType::INPUT, index, type, offset, in setInputFromMemory()
313 if (!memory->getValidator().validate(mCompilation, IOType::OUTPUT, index, type, offset, in setOutputFromMemory()
DNeuralNetworks.cpp993 return mb->addRole(*c, IOType::INPUT, index, frequency); in ANeuralNetworksMemoryDesc_addInputRole()
1006 return mb->addRole(*c, IOType::OUTPUT, index, frequency); in ANeuralNetworksMemoryDesc_addOutputRole()
DModelBuilder.cpp351 if (!memory->getValidator().validate(/*compilation=*/nullptr, /*placeholder*/ IOType::INPUT, in setOperandValueFromMemory()
/packages/modules/NeuralNetworks/runtime/test/
DTestPartitioning.cpp167 using IOType = ::android::nn::IOType; typedef
3371 using TestStepRole = std::tuple<std::string, IOType>;
3386 ss << "{" << deviceName << ", " << (type == IOType::INPUT ? "INPUT" : "OUTPUT") << "} "; in toString()
3404 index, [&actual](const auto* preparedModel, IOType type, uint32_t) { in checkStepRolesOfInput()
3415 index, [&actual](const auto* preparedModel, IOType type, uint32_t) { in checkStepRolesOfOutput()
3427 index, [&actual](const auto* preparedModel, IOType type, uint32_t) { in checkStepRolesOfSourceOperand()
3461 checkStepRolesOfInput(0, {{"deviceA", IOType::INPUT}}); in TEST_F()
3462 checkStepRolesOfInput(2, {{"deviceB", IOType::INPUT}}); in TEST_F()
3464 checkStepRolesOfInput(1, {{"deviceA", IOType::INPUT}, {"deviceB", IOType::INPUT}}); in TEST_F()
3466 checkStepRolesOfOutput(0, {{"deviceA", IOType::OUTPUT}, {"deviceC", IOType::INPUT}}); in TEST_F()
[all …]
/packages/modules/NeuralNetworks/common/types/include/nnapi/
DValidation.h85 enum class IOType { INPUT, OUTPUT }; enum
86 using PreparedModelRole = std::tuple<const IPreparedModel*, IOType, uint32_t>;
/packages/modules/NeuralNetworks/common/
DHalBufferTracker.cpp71 if (kRoles.count({preparedModel, IOType::INPUT, i}) == 0) { in validateRequest()
99 if (kRoles.count({preparedModel, IOType::OUTPUT, i}) == 0) { in validateRequest()
DBufferTracker.cpp71 if (kRoles.count({preparedModel, IOType::INPUT, i}) == 0) { in validateRequest()
98 if (kRoles.count({preparedModel, IOType::OUTPUT, i}) == 0) { in validateRequest()
DValidateHal.cpp893 const auto [it, success] = roles.emplace(preparedModel.get(), IOType::INPUT, role.ioIndex); in validateMemoryDesc()
907 const auto [it, success] = roles.emplace(preparedModel.get(), IOType::OUTPUT, role.ioIndex); in validateMemoryDesc()
/packages/modules/NeuralNetworks/common/include/
DValidateHal.h35 using HalPreparedModelRole = std::tuple<const V1_3::IPreparedModel*, IOType, uint32_t>;
/packages/modules/NeuralNetworks/common/types/src/
DValidation.cpp1267 const auto [it, success] = roles.emplace(preparedModel.get(), IOType::INPUT, role.ioIndex); in validateMemoryDescImpl()
1281 const auto [it, success] = roles.emplace(preparedModel.get(), IOType::OUTPUT, role.ioIndex); in validateMemoryDescImpl()